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

CSS样式表
web标准布局实例教程,用定位轻松解决CSS复杂布局
css静态滤镜
CSS 实用实例(推荐)
给超级链接增加其他样式
给图片加阴影效果的CSS
CSS反转字符加密邮箱地址
firefox样式表定义不支持cursor:hand
解决input对齐问题vertical-alige
表格隔行换色 css expression
HTML标记
CSS圆角区块容器生成器
容器高度100%的绝对定位布局
保存几个不错的css特效字
CSS滤镜示范(filter)附源代码(静态滤镜)
CSS实现表格的背景两色渐变
梦幻式下拉菜单
闭合浮动元素超级简单的方法
文字应用css滤镜集锦
巧用CSS滤镜做图案文字
_blank开新窗口不符合标准?

CSS样式表书写顺序


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