CSS学习笔记-过渡模块

过渡模块:
    一、过渡三要素
        1.1必需要有属性发生变化
        1.2必须告诉系统哪一个属性须要执行过渡效果
        1.3必须告诉系统过渡效果持续时长
    二、格式:
        div{
            width:100px;
            height:100px;
            background-color:red;
            
            transition-property:width;
            transition-duration:0.5s;
        }
        
        div:hover{
            width:300px;
        }
        (:link默认/:visited访问后/:hover鼠标悬浮/:active长按)    爱恨原则:【L】o【v】e    【H】【a】teblog

    三、注意点:
        当多个属性须要同时执行过渡效果时,用逗号隔开便可:    
            transition-property:width,background-color;
            transition-duration:5s,5s;
    
过分模块其余属性:
    一、transition-dalay:2s;
        告诉系统延迟多少秒以后才开始过渡   
    二、transition-timing-funtion:linear;
        取值:linear/ease/ease-in/ease-out/ease-in-outit

   过渡曲线 


过渡模块_连写:
    一、连写格式:
        transition:过渡属性 过渡时长 运动速度 延迟时间;
    二、过渡连写注意点:
        2.1若是想给多个属性添加过渡效果,用逗号隔开便可,如:
            transition:width 1s linear 0s,background-color 1s linear 0s;
        2.2连写的时候能够省略后面的两个参数,保证前面的三要素便可,如:
            transition:width 1s,background-color 1s;
        2.3若是多个属性运动的速度/延迟的时间/持续时间都同样,能够简写为:
            transition:all 0s;io

相关文章
相关标签/搜索