css 简写属性 规则 次序 汇总 书写顺序
2016-02-18 22:25
701 查看
简写属性顺序
1.animation 次序:-name -duration -timing-function -delay -iteration-count -direction
2.background 次序:-color -image -repeat -attachment -position
3.border 次序:-width -style -color
4.border-image 次序:-source -slice -repeat
5.font 次序:-style -variant -weight -size/line-height -family
6.list-style 次序:-type -position -image
7.columns 次序:-width -count
8.column-rule 次序:-width -style -color
9.transition 次序:-property -duration -timing-function -delay
10.margin/padding
省略的属性等同于前第二个属性值,第二个等于第一个,例如下等于上,左等于右。常见顺序为上右下左。
1px == 1px 1px 1px 1px
1px 2px == 1px 2px 1px 2px
1px 2px 3px == 1px 2px 3px 2px
css书写顺序
1.位置属性(position, top, right, z-index, display, float等)
2.大小(width, height, padding, margin)
3.文字系列(font, line-height, letter-spacing, color- text-align等)
4.背景(background, border等)
5.其他(animation, transition等)
1.animation 次序:-name -duration -timing-function -delay -iteration-count -direction
2.background 次序:-color -image -repeat -attachment -position
3.border 次序:-width -style -color
4.border-image 次序:-source -slice -repeat
5.font 次序:-style -variant -weight -size/line-height -family
6.list-style 次序:-type -position -image
7.columns 次序:-width -count
8.column-rule 次序:-width -style -color
9.transition 次序:-property -duration -timing-function -delay
10.margin/padding
省略的属性等同于前第二个属性值,第二个等于第一个,例如下等于上,左等于右。常见顺序为上右下左。
1px == 1px 1px 1px 1px
1px 2px == 1px 2px 1px 2px
1px 2px 3px == 1px 2px 3px 2px
css书写顺序
1.位置属性(position, top, right, z-index, display, float等)
2.大小(width, height, padding, margin)
3.文字系列(font, line-height, letter-spacing, color- text-align等)
4.背景(background, border等)
5.其他(animation, transition等)
相关文章推荐
- css3,background-clip/background-origin的使用场景,通俗讲解
- css基础
- CSS中margin-top属性失效问题解决
- CSS3 去除苹果浏览器按钮input[type="submit"]和input[type="reset"]的默认样式
- css设计指南-笔记3
- css设计指南-笔记2
- css设计指南-笔记1
- div+css制作带箭头提示框效果图(原创文章)
- WPF 窗体样式修改
- OGR样式模型
- HTML/CSS
- 博客格式测试
- css3篇——box-sizing
- css画下图
- css实现图片垂直水平居中
- iOS工程中个别页面中区别于导航栏样式的导航栏bug
- css文本溢出省略号
- CSS clear both清除浮动
- CSS3 animation-fill-mode 属性
- css3动画实例分段讲解