lesson 3

**CSS3的进阶特性**

- verticle-align    

    - 垂直对齐方式    

    - 只对容器内的inline-block元素起作用:图片,按钮,单复选框,单行/多行文本框等HTML控件    

    - top, text-top, middle, bottom, text-bottom, baselinehttp://www.zhangxinxu.com/study/201005/verticle-align-test-demo.html- flex```

1

2

3

4

.flex-container{

width: 160px;

height: 100px;

background: #FFD54F;

display: flex;

/* flex-direction: row;

flex-wrap: wrap;*/

}

.flex-item{

background: white;

width: 40px;

height: 40px;

text-align: center;

vertical-align: middle;

margin: 4px;

text-align: center;

}

.flex-item-inner{

left: 5px;

top: 5px;

position: relative;

width: 30px;

height: 30px;

line-height: 30px;

font-size: 20px;

border-radius: 50%;

color: white;

background: orange;

}```![flex布局](http://upload-images.jianshu.io/upload_images/3950483-10c2ee70678165a5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)    - ie9开始支持    - display:flex;    - justify-content: 主轴对齐方式    - align-items: 副轴对齐方式    - order: 顺序    - wrap: 是否换行 默认不换    - flex-basis: 在还有剩余空间时的    - flex-grow:    - flex-shrink:![主轴对齐](http://upload-images.jianshu.io/upload_images/3950483-d5ab536778e86e42.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)![副轴对齐](http://upload-images.jianshu.io/upload_images/3950483-b6c927b5b9437617.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)- transform  translateX translateY scale rotate- 动画transition- 动画animation

你可能感兴趣的:(lesson 3)