第十五节 组选择器

 1 <!DOCTYPE html>
 2 <html lang="en">
 3 <head>
 4     <meta charset="UTF-8">
 5     <title>Document</title>
 6     <style type="text/css">
 7         <!-- 组选择器,将同样的样式抽取出来,写在一起 -->
 8         .box1,.box2,.box3{
 9             font-size: 40px;
10             text-indent: 40px;  /* 首行缩进 */
11         }
12         .box1{
13             color: red; white-space: 
14         }
15 
16         .box2{
17             color: pink;
18         }
19         .box3{
20             color: blue;
21         }
22     </style>
23 </head>
24 <body>
25     <div class="box1">这是第一个div</div>
26     <div class="box2">这是第二个div</div>
27     <div class="box3">这是第三div</div>
28 </body>
29 </html>

猜你喜欢

转载自www.cnblogs.com/kogmaw/p/12420571.html
今日推荐