快速分栏

HTML代码:

<div class="col-2">随便写什么</div>
<div class="col-2">随便写什么</div>
<div class="col-2">随便写什么</div>
<div class="col-2">随便写什么</div>
<div class="col-2">随便写什么</div>

CSS代码:

 1 .col-1,
 2 .col-2,
 3 .col-3,
 4 .col-4,
 5 .col-5,
 6 .col-6,
 7 .col-7,
 8 .col-8,
 9 .col-9{
10   display: bolock;
11   position: relative;
12   min-height: 1px;
13   float: left;
14 }
15 
16 .col-1{
17   width: 10%;
18 }
19 
20 .col-2{
21   width: 20%;
22 }
23 
24 .col-3{
25   width: 30%;
26 }
27 
28 .col-4{
29   width: 40%;
30 }
31 
32 .col-5{
33   width: 50%;
34 }
35 
36 .col-6{
37   width: 60%;
38 }
39 
40 .col-7{
41   width: 70%;
42 }
43 
44 .col-8{
45   width: 80%;
46 }
47 
48 .col-9{
49   width: 90%;
50 }
View Code
原文地址:https://www.cnblogs.com/wuaidongfang/p/9984539.html