| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- ///* flex布局 */
- .flex {
- display: flex;
- }
- .flex-inline {
- display: inline-flex;
- }
- .flex-auto {
- flex: 1;
- overflow: hidden;
- }
- .flex-center {
- @extend .flex;
- flex-direction: column;
- width: 100%;
- overflow: hidden;
- align-items: center;
- justify-content: center;
- align-content: center;
- }
- .flex-margin {
- margin: auto;
- }
- .flex-warp {
- display: flex;
- flex-wrap: wrap;
- align-content: flex-start;
- margin: 0 -5px;
- .flex-warp-item {
- padding: 5px;
- .flex-warp-item-box {
- width: 100%;
- height: 100%;
- }
- }
- }
- .flex-just-between {
- justify-content: space-between;
- }
- .flex-just-around {
- justify-content: space-around;
- }
- .flex-justify-center {
- justify-content: center;
- }
- .flex-align-items-center {
- align-items: center;
- align-content: center;
- }
- .flex-just-end {
- justify-content: flex-end;
- }
- .w50 {
- width: 50% !important;
- }
- .w100 {
- width: 100% !important;
- }
- .h100 {
- height: 100% !important;
- }
- .vh100 {
- height: 100vh !important;
- }
- /* 字体大小全局样式
- ------------------------------- */
- @for $i from 10 through 32 {
- .font#{$i} {
- font-size: #{$i}px !important;
- }
- }
- /* 外边距、内边距全局样式
- ------------------------------- */
- @for $i from 1 through 20 {
- .mt#{$i} {
- margin-top: #{$i}px !important;
- }
- .mr#{$i} {
- margin-right: #{$i}px !important;
- }
- .mb#{$i} {
- margin-bottom: #{$i}px !important;
- }
- .ml#{$i} {
- margin-left: #{$i}px !important;
- }
- .pt#{$i} {
- padding-top: #{$i}px !important;
- }
- .pr#{$i} {
- padding-right: #{$i}px !important;
- }
- .pb#{$i} {
- padding-bottom: #{$i}px !important;
- }
- .pl#{$i} {
- padding-left: #{$i}px !important;
- }
- .pv#{$i} {
- padding: #{$i}px auto !important;
- }
- .ph#{$i} {
- padding: auto #{$i}px !important;
- }
- .pd#{$i} {
- padding: #{$i}px !important;
- }
- .mv#{$i} {
- margin: #{$i}px auto !important;
- }
- .mh#{$i} {
- margin: auto #{$i}px !important;
- }
- .mg#{$i} {
- margin: #{$i}px #{$i}px !important;
- }
- }
- @for $i from 2 to 100 {
- .fs-#{$i} {
- font-size: #{$i}rpx;
- }
- .lh-#{$i} {
- line-height: #{$i}rpx;
- }
- }
- .fs-0 {
- font-size: 0px;
- }
- .fw-500 {
- font-weight: 500;
- }
- .fw-600 {
- font-weight: 600;
- }
- .fw-bold {
- font-weight: bold;
- }
- .lh-0 {
- line-height: 0px;
- }
- .lh-normal {
- line-height: normal;
- }
- .text-center {
- text-align: center;
- }
- $position: top, right, bottom, left;
- @each $item in $position {
- .m#{str-slice($item, 0, 1)}-auto {
- margin-#{$item}: auto;
- }
- .m#{str-slice($item, 0, 1)}-0 {
- margin-#{$item}: 0px;
- }
- }
- @for $i from 2 to 100 {
- @each $item in $position {
- .m#{str-slice($item, 0, 1)}-#{$i} {
- margin-#{$item}: #{$i}rpx;
- }
- .p#{str-slice($item, 0, 1)}-#{$i} {
- padding-#{$item}: #{$i}rpx;
- }
- }
- .height-#{$i} {
- height: #{$i}rpx;
- }
- .width-#{$i} {
- width: #{$i}rpx;
- }
- .br-#{$i} {
- border-radius: #{$i}rpx;
- }
- }
- .br-round {
- border-radius: 50%;
- }
- .mb-0 {
- margin-bottom: 0px;
- }
- .ml-auto {
- margin-left: auto;
- }
- .mt-auto {
- margin-top: auto;
- }
- .width-168 {
- width: 168rpx;
- }
- .width-half {
- width: 50%;
- }
|