zoukankan      html  css  js  c++  java
  • 5.4 CSS3 transition动画

     

    1、transition-property 设置过渡的属性,比如:width height background-color
    2、transition-duration 设置过渡的时间,比如:1s 500ms
    3、transition-timing-function 设置过渡的运动方式

    • linear 匀速
    • ease 开始和结束慢速
    • ease-in 开始是慢速
    • ease-out 结束时慢速
    • ease-in-out 开始和结束时慢速
    • cubic-bezier(n,n,n,n)

    4、transition-delay 设置动画的延迟
    5、transition: property duration timing-function delay 同时设置四个属性

    举例:

    <style type="text/css">        
    .box{
        100px;
        height:100px;
        background-color:gold;
        transition:width 300ms ease,height 300ms ease 300ms,background-color 300ms ease 600ms;            
    }
    .box:hover{
        300px;
        height:300px;
        background-color:red;
    }
    </style>
    ......
    <div class="box"></div>
  • 相关阅读:
    第十周作业
    第九周作业
    软件工程作业2
    自我介绍
    2019学习总结
    第二周作业
    十二周
    十一周
    第十周作业
    第九周作业
  • 原文地址:https://www.cnblogs.com/LiuYanYGZ/p/12350564.html
Copyright © 2011-2022 走看看