123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- // 水平垂直居中
- @mixin mid($x: 50%, $y: 50%) {
- position: absolute;
- left: $x;
- top: $y;
- transform: translate3d(-$x, -$y, 0);
- }
- // 水平垂直居中(margin版)
- @mixin marMid($x, $y, $mx, $my) {
- position: absolute;
- left: $x;
- top: $y;
- margin-left: $mx;
- margin-top: $my;
- }
- // 水平居中
- @mixin xMid($x: 50%) {
- position: absolute;
- left: $x;
- transform: translate3d(-$x, 0, 0);
- }
- // 垂直居中
- @mixin yMid($y: 50%) {
- position: absolute;
- top: $y;
- transform: translate3d(0, -$y, 0);
- }
- // 字体大小、行高、字体
- @mixin font($size, $line-height, $family: 'Microsoft YaHei') {
- font: #{$size}/#{$line-height} $family;
- }
- // 字体大小、字体颜色、字体粗细
- @mixin fcw($size, $color, $weight: 400) {
- font-size: $size;
- color: $color;
- font-weight: $weight;
- }
- // 文字省略
- @mixin textSinOmit() {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- // 文字多行省略
- @mixin textMulOmit($col: 2) {
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: $col;
- -webkit-box-orient: vertical;
- }
- // 宽高
- @mixin wh($width, $height) {
- width: $width;
- height: $height;
- }
- @mixin ossBg($name) {
- background-image: url('https://birdseye-img.sysuimars.com/birdseye-look-vue/' + $name);
- background-size: 100% 100%;
- }
- @mixin PingFang($color:#FFFFFF, $weight:bold) {
- font-family: PingFang-SC-Regular;
- font-weight: $weight;
- color: $color;
- }
- @mixin JXZK($color:#FFFFFF, $weight:bold) {
- font-family: jiangxizhuokai;
- font-weight: $weight;
- color: $color;
- }
- @mixin CKTK($color:#FFFFFF, $weight:bold) {
- font-family: CKTKingkong;
- font-weight: $weight;
- color: $color;
- }
- @mixin Title() {
- position: relative;
- width: 147rpx;
- height: 56rpx;
- }
- @mixin TitleBg($bgName) {
- z-index: 0;
- position: absolute;
- bottom: 0rpx;
- width: 147rpx;
- height: 42rpx;
- @include ossBg($bgName);
- }
- @mixin TitleText($color:#000000) {
- text-align: center;
- width: 100%;
- position: absolute;
- z-index: 1;
- @include PingFang($color);
- font-size: 30rpx;
- }
- @mixin FlexRowCenter($justify-content:space-around) {
- display: flex;
- align-items: center;
- justify-content: $justify-content;
- }
- @mixin LeftTop($left: 0, $top: 0) {
- position: absolute;
- left: $left;
- top: $top;
- }
|