zoukankan      html  css  js  c++  java
  • CSS3平滑过渡transition


    <!DOCTYPE html>
    <head>
    <meta charset="utf-8" />
    <title>CSS3平滑过渡transition</title>
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <script src="js/jquery-1.10.2.js"></script>
    <style>
    #timings-demo {
    border: 1px solid #ccc;
    padding: 10px;
    height: 400px;
    400px;
    }

    .demo-box {
    100px;
    height: 50px;
    text-align: center;
    line-height: 50px;
    text-align: center;
    color: #fff;
    background: #96c;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
    -moz-box-shadow: inset 0 0 5px rgba(102, 153, 0,0.5);
    -webkit-box-shadow: inset 0 0 5px rgba(102, 153, 0,0.5);
    box-shadow: inset 0 0 5px rgba(102, 153, 0,0.5);
    margin-bottom: 10px;
    }
    #ease {
    -moz-transition: all 5s ease 0.3s;
    -webkit-transition: all 5s ease 0.3s;
    -o-transition: all 5s ease 0.3s;
    transition: all 5s ease 0.3s;
    background: #f36;
    }
    #ease-in{
    -moz-transition:all 3s ease-in 0.5s;
    -webkit-transition: all 3s ease-in 0.5s;
    -o-transition:all 3s ease-in 0.5s;
    transition:all 3s ease-in 0.5s;
    background: #369;
    }
    #ease-out{
    -moz-transition:all 5s ease-out 0s;
    -webkit-transition:all 5s ease-out 0s;
    -o-transition:all 5s ease-out 0s;
    transition:all 5s ease-out 0s;
    banckground:#636;
    }
    #ease-in-out{
    -moz-transition: all 1s ease-in-out 2s;
    -webkit-transition: all 1s ease-in-out 2s;
    -o-transition: all 1s ease-in-out 2s;
    transition: all 1s ease-in-out 2s;
    background: #3e6;
    }
    #linear{
    -moz-transition:all 6s linear 0s;
    -webkit-transition:all 6s linear 0s;
    -o-transition:all 6s linear 0s;
    transition:all 6s linear 0s;
    background: #999;

    }
    #cubic-bezier{
    -moz-transition: all 4s cubic-bezier 1s;
    -webkit-transition: all 4s cubic-bezier 1s;
    -o-transition: all 4s cubic-bezier 1s;
    transition: all 4s cubic-bezier 1s;
    background: #6d6;
    }
    .timings-demo-hover,#timings-demo:hover .demo-box{
    -moz-transform: rotate(360deg) scale(1.2);
    -webkit-transform:rotate(360deg) scale(1.2);
    -moz-transform: rotate(360deg) scale(1.2);
    transform:rotate(360deg) scale(1.2);
    background: #369;
    border: 1px solid rgba(255,230,255,08);
    -moz-border-radius: 25px;
    -webkit-border-radius: 25px;
    border-radius: 25px;
    margin-left: 280px;
    height: 30px;
    line-height: 30px;
    margin-bottom: 15px;
    }
    </style>

    </head>
    <body>
    <a id="timings-demo-btn">click</a>
    <div id="timings-demo">
    <div id="ease" class="demo-box">Ease</div>
    <div id="ease-in" class="demo-box">Ease-in</div>
    <div id="ease-out" class="demo-box">Ease-out</div>
    <div id="ease-in-out" class="demo-box">Ease-in-out</div>
    <div id="linear" class="demo-box">Linear</div>
    <div id="cubic-bezier" class="demo-box">Cubic-bezier</div>
    </div>
    </body>
    </html>

  • 相关阅读:
    vue.js实战——.native修饰符
    vue.js实战——props数据验证(自定义构造器检测)
    vue.js实战——props单向数据流
    vue组件之嵌套
    vue非父子组件之间的通信——发布订阅模式,总线机制
    脚本加载优化方法
    文字溢出时,实现在末尾显示三个点省略效果
    1-stm32 gpio库函数
    2-C语言 排序算法
    电子工程师扫盲
  • 原文地址:https://www.cnblogs.com/lily2015/p/4661617.html
Copyright © 2011-2022 走看看