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

CSS样式表
字符不会撑大表格的常见css样式
表格高级使用技巧_把表格进行到底(必看)
网页中Span和Div的区别
在IE与FF中如何居中的css写法
javascript横排竖排标准选项卡效果代码
解决ie动态修改link样式,import css不刷新的问题
css不用图片美化按钮
网页打开新窗口target=_blank不符合标准
Javascript的匿名函数讲解
Firefox2中输入框丢失光标bug的解决方法
Firefox返回时Iframe的显示Bug的解决方法
使网页成黑白色调的滤镜
CSS学习笔记Padding 属性中参数的定义与使用
无限级CSS树形菜单 Ver2.0
css多行多列的新闻模式
Internet Explorer 8 beta 中文版与IE7共存的解决方法
CSS对Web页面载入效率的影响分析总结
巧妙地使用CSS选择器
去除链接元素的虚线框 兼容IE7、IE6、FF
DIV border边框显示不完全问题的解决方法

CSS样式表书写顺序


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