tj
2025-06-05 bba272999cc546f65781bf3d20245a3f819af67f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
 
// 根据不同的屏幕加载背景图片
@mixin bi($url, $type: 'png') {
  background-image: url($url + "@2x." + $type);
  @media (-webkit-min-device-pixel-ratio: 3), (min-device-pixel-ratio: 3) {
    background-image: url($url + "@3x." + $type);
    background-size: cover;
  }
}
 
// 文字超出后以...显示
@mixin no-wrap {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
 
// 扩展小图标按钮的点击区域
@mixin extend-click() {
  position: relative;
  &:before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
  }
}
 
@mixin btn-scale-hover(){
  transition: .4s all;
  &:hover{
    transform: scale(1.1);
  }
}
 
@mixin bi-saturate-hover($background-color, $value: 20){ // 背景颜色增加饱和度
  transition: .6s all;
  &:hover{
    background-color: saturate($background-color, $value);
  }
}
 
@mixin color-saturate-hover($color, $value: 30){ // 颜色增加饱和度
  transition: .6s all;
  &:hover{
    color: saturate($color, $value);
  }
}
 
@mixin bi-lighten-hover($background-color, $value: 10){ // 背景颜色变浅。
  transition: .6s all;
  &:hover{
    background-color: lighten($background-color, $value);
  }
}
 
@mixin bi-opacity-hover($opacity: .8){ // 透明度
  transition: .4s all;
  &:hover{
    opacity: $opacity;
  }
}