CSS 书写顺序

来源:互联网 发布:如何开好一个淘宝店 编辑:程序博客网 时间:2024/05/17 04:27

Style Write Order

display || visibility
list-style : list-style-type || list-style-position || list-style-image
position
top || right || bottom || left
z-index
clear
float

width
max-width || min-width
height
max-height || min-height
overflow || clip
margin : margin-top || margin-right || margin-bottom || margin-left
padding : padding-top || padding-right || padding-bottom || padding-left
outline : outline-color || outline-style || outline-width
border
background : background-color || background-image || background-repeat || background-attachment || background-position

color
font : font-style || font-variant || font-weight || font-size || line-height || font-family

字体名称。按优先顺序排列。以逗号隔开。如果字体名称包含空格,则应使用引号括起

font : caption | icon | menu | message-box | small-caption | status-bar
text-overflow
text-align
text-indent
line-height
white-space
vertical-align
cursor

收藏自 CSS书写顺序 http://www.cssforest.org/blog/index.php?id=38

原创粉丝点击