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

CSS样式表
论WEB标准在中国的灰飞烟灭
CSS 清除浮动元素方法 整理
css FF与IE兼容性总结
div css 鼠标悬停在div层上时,div背景色改变
IE6不支持CSS中的min-width/height属性问题的解决方法
CSS 自动定位 的应用
CSS 样式命名规则
IE7下生成高质量CSS缩略图
编写CSS代码时样式的命名规则
用css来实现透视效果
word-wrap
div+css排版的样例
HTML结构化:实践DIV+CSS网页布局入门指南
CSS锦囊
DIV_圆边圆角的实现
凹陷文字 推荐
自定义容器和字体大小
IE最新的欺骗代码
ASP+CSS 实现列表隔行换色
无边框表格

CSS样式表书写顺序


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