样式表之重叠性

 1 <!DOCTYPE html>
 2 <html lang="en">
 3 <head>
 4     <meta charset="UTF-8">
 5     <title>Document</title>
 6     <style type="text/css">
 7     .box{
 8         font:60px microsoft yahei;
 9         color:pink;
10     }
11     .box2{
12         font-size:100px;
13         color:yellow;
14     }
15     </style>
16 </head>
17 <body>
18     <div class="box box2">星期五</div>
19 </body>
20 </html>

 

css三大特性:;
1.重叠性
 前提:当多个样式作用于同一个或者同一类标签时,样式发生了冲突

 结果:总是执行后面的代码,这是因为浏览器的解析顺序,后面的代码重叠前面的代码。

 

转载于:https://www.cnblogs.com/twinkle-/p/9086735.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值