3User.com 三人行社区3User.com 三人行社区
3user特别推荐:

绑定MSN/QQ/GTalk

获取网站更新(帮助)

[原]CSS书写顺序

发新帖
«» 5 

[原]CSS书写顺序

ghost

于 08-05-10 22:34 通过网页 帖子号: 14478

[原]CSS书写顺序

整理了一下自己写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
========================

文章地址:http://www.cssforest.org/blog/index.php?id=38

楼主

zhaozy

08-05-12 10:52 通过网页

回复:[原]CSS书写顺序

css的书写顺序规范化后对维护修改相当有好处的说, 顺序和我的差不太多.. 哈哈

1楼

mscript script editor + instant source + ie dev toolbar + httpwatch PK Firebug

0596租房网

  • 0596租房网
  • 490
  • 95
  • 436
  • 加为好友

08-05-13 19:58 通过网页

回复:[原]CSS书写顺序

学习了,哈哈

outline,有什么用啊

2楼

漳州租房就上0596租房网 www.0596zf.com

csy853的三人行个人首页

08-05-14 09:14 通过QQ

回复:[原]CSS书写顺序

好,很规范,学习了。

3楼

csy853的三人行个人首页

08-05-14 10:21 通过QQ

回复:[原]CSS书写顺序

outline我主要是布局的时候,有时候也用background,因为IE不支持outline

4楼

cool

08-05-14 10:22 通过QQ

回复:[原]CSS书写顺序

用background

5楼

«» 5 

您还没有登录,登录后可回复帖子,