CSS属性编写顺序


1)显示属性:

1 display || visibility
2 list-style : list-style-type || list-style-position || list-style-image
3 position
4 top || right || bottom || left
5 z-index 
6 clear 
7 float

 

2)自身属性:

1 width max-width || min-width
2 height max-height || min-height
3 overflow || clip
4 margin : margin-top || margin-right || margin-bottom || margin-left
5 padding : padding-top || padding-right || padding-bottom || padding-left
6 outline : outline-color || outline-style || outline-width
7 border
8 background : background-color || background-image || background-repeat || background-attachment || background-position

 

3)文本属性:

 1 color
 2 font : font-style || font-variant || font-weight || font-size || line-height ||font-family
 3 font : caption | icon | menu | message-box | small-caption | status-bar
 4 text-overflow
 5 text-align
 6 text-indent
 7 line-height
 8 white-space
 9 vertical-align
10 cursor 

 

4)CSS3属性:

transform/transition/animation/box-shadow/border-radius

 

5)如果使用CSS3的属性,如果有必要加入浏览器前缀,则按照
-webkit- / -moz- / -ms- / -o- / std的顺序进行添加,标准属性写在最后。

链接的样式请严格按照如下顺序添加:

a:link -> a:visited -> a:hover -> a:active

 

转载于:https://www.cnblogs.com/yu520zhong/p/4844457.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值