自定义五列的 CSS 类

这种方法相对简单的,自定义一套CSS类,尽量和Bootstrap风格保持一致。

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
.col-xs -5 ths, .col-sm -5 ths, .col-md -5 ths, .col-lg -5 ths {
     position relative ;
     min-height 1px ;
     padding-right 10px ;
     padding-left 10px ;
}
 
@media ( min-width :  768px ) {
     .col-sm -5 ths {
         width 20% ;
         float left ;
     }
}
 
@media ( min-width :  992px ) {
     .col-md -5 ths {
         width 20% ;
         float left ;
     }
}
 
@media ( min-width :  1200px ) {
     .col-lg -5 ths {
         width 20% ;
         float left ;
     }
}