transition属性 (过渡)
属性值:
- 参与过渡的属性(默认的为all)
- 时间(过渡的时间 s ms)
- 延迟时间 s ms
- 运动的类型 linear(匀速)
注:transition必须通过事件触发,如 :hover
运动类型:贝塞尔曲线https://cubic-bezier.com/#.33,1.84,.47,-0.88
<style>
.box{
width: 500px;
height: 300px;
background: orange;
transition: background 1s 2s,width 3s;
}.box:hover{
background: blue;
width: 1000px;
}
</style>