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

CSS样式表
CSS定位中Positoin、absolute、Relative的一些研究
脚本控制三行三列自适应高度DIV布局的代码
word-wrap在firefox中不起作用的解决方法
网页设计者需要了解的_网页字体大小数据参考
div+css与xhtml+css分别是什么意思?
xhtml+css网页制作中常见问题解决方法
表格标签table深入了解
DIV+CSS网页另类上下布局的实例代码
CSS实现每行新闻数量不等效果代码
JAVASCRIPT IE 与 FF 中兼容写法记录
让超出DIV宽度范围的文字自动显示省略号...
CSS使用学习总结
解决IE6 3像素Bug的css写法
用CSS控制表格或单元格强制换行,防止表格被英文单词或中文撑大
firefox margin-top失效的原因与解决办法
IE hack条件写法
css pointer控制在firefox下显示手型的代码
纯CSS实现上下左右都居中的代码
在DW中CSS编码需要注意和掌握的一些技巧
DIV CSS网页布局 最小高度(min-height)的妙用

CSS样式表书写顺序


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-28   浏览: 77 ::
收藏到网摘: 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