CSS3 transition动画

2018-06-11  本文已影响0人  清歌扶酒_6258

1、transition-property 设置过渡的属性,比如:width height background-color

2、transition-duration 设置过渡的时间,比如:1s 500ms

3、transition-timing-function 设置过渡的运动方式

4、transition-delay 设置动画的延迟

5、transition: property duration timing-function delay 同时设置四个属性

<style type="text/css">       
.box{
    width:100px;
    height:100px;
    background-color:gold;
    transition:width 300ms ease,height 300ms ease 300ms,background-color 300ms ease 600ms;            
}
.box:hover{
    width:300px;
    height:300px;
    background-color:red;
}
</style>
......
<div class="box"></div>


上一篇 下一篇

猜你喜欢

热点阅读