ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
## css规范 * **样式与内容分离,禁止行内样式,禁止将样式写成单行** * **不用标签做样式筛选,避免使用通配规则**。Eg:.header span{ color: #fff } * **不建议用标签名或者css样式定义class名称** ***** * **注意css书写顺序:是否可见->是否清除浮动->盒子->文本->过度及动画** 1. 定位属性:position  display  float  left  top  right  bottom   overflow  clear   z-index 2. 自身属性:width  height  padding  border  margin   background 3. 文字样式:font-family   font-size   font-style   font-weight   font-varient   color    4. 文本属性:text-align   vertical-align   text-wrap   text-transform   text-indent    text-decoration  letter-spacing    word-spacing  white-space   text-overflow 5. css3中新增属性:content   box-shadow   border-radius  transform… ***** * **如果属性值可以为none,避免属性值0的写法(禁止向0后添加单位)。eg:border: 0px, border: none** * **常用的属性可以单独拎出来定义公共class** * **选择器与属性名的:后必须要有空格,前禁止加空格**,eg:.hotel-content { color: #fff }