wangzhibo
4 天以前 10595d8632f959d0954d1939243196f4eed02372
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
@use "sass:math";
 
.cl-col {
    width: 100%;
    box-sizing: border-box;
 
    &::before {
        content: "";
        display: block;
    }
}
 
[class*="cl-col-"] {
    float: left;
    box-sizing: border-box;
}
 
.cl-col-0 {
    display: none;
    width: 0%;
}
 
@for $i from 1 through 24 {
    .cl-col-push-#{$i},
    .cl-col-pull-#{$i} {
        position: relative;
    }
}
 
@for $i from 1 through 24 {
    $w: math.div(100%, 24);
 
    .cl-col-#{$i} {
        width: $w * $i;
    }
 
    .cl-col-offset-#{$i} {
        margin-left: $w * $i;
    }
 
    .cl-col-pull-#{$i} {
        right: $w * $i;
    }
 
    .cl-col-push-#{$i} {
        left: $w * $i;
    }
}