CSS书写及命名规范

1、样式书写顺序

positioning定位::position、display、float、top、 right、bottom、left、overflow、clear、z-index;

box model盒模型::width、height、border、padding、margin、background;

typographic文本样式: font-family、font-size、font-style、font-weight、font-varient、color;

文字属性:text-align、vertical-align、text-wrap、text-transform、text-indent、text-decoration、letter-spacing、word-spacing、white-space、text-overflow;

新增属性:background、border、content、box-shadow、border-radius、list-style、transform、animation、transition...

 2、命名规范

选择器不要使用下划线"_";

  

 

posted @ 2019-04-18 20:22  し7709  阅读(149)  评论(0编辑  收藏  举报