CSS

css书写规范、顺序

Posted by Daisydan on October 16, 2015

css书写顺序

1.位置属性(postion、top、right、z-index、display、float等) 2.大小(width、height、padding、margin等) 3.文字系列(font、line-height、letter-sapce等) 4.背景(background、border等) 5.其他(animation、transtion等)

css样式表文件命名

主要的 master.css  模块 module.css  基本共用 base.css  布局、版面 layout.css  主题 themes.css  专栏 columns.css  文字 font.css  表单 forms.css  补丁 mend.css  打印 print.css

其他

class和id命名要简洁并表明含义 详细可参考:http://nec.netease.com/standard/css-sort.html