当前位置: 首页 > 图文教程 > 网页制作 > CSS样式表 > CSS样式表书写顺序

CSS样式表
脚本控制三行三列自适应高度DIV布局
通过CSS Hack 区分 FF/IE7/IE6/IE5.5/IE5 代码推荐
HTML/XHTML模板
用DIV+CSS写小三角
SPAN元素和DIV元素有的区别
关于Firefox中的Flash不可以显示透明效果的问题
当ie7不认!important之后 [布局的解决办法]
绝对定位的DIV宽度自动适应的一个方法
被人遗忘的html tags
一个css 的小问题
IE 5.x/Win 和模型bug
[转]目前找到的最好的Iframe自适应高度代码
Web Safe Color Pallette
网站制作之网页技巧
http状态码一览表
从Table向Css过渡的优缺点比较
不用float实现div模块居中布局
解决列高度自适应(相同)的五种方法
用CSS floats创建三栏页布局
如何正确使用标题元素、段落和强制换行

CSS样式表书写顺序


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-28   浏览: 129 ::
收藏到网摘: n/a

整理了一下自己写CSS时的顺序,跟大家分享下。

下表顺序为从上到下,从左到右:
========================
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