zoukankan      html  css  js  c++  java
  • CSS3动画transform、transition和animation的区别

    https://www.cnblogs.com/ypppt/p/13363747.html

    transition-timing-function 动画的执行方式

    值:ease(逐渐慢下来),linear(匀速),ease-in(由慢到快),ease-out(由快到慢),ease-in-out(先慢到快再到慢),cubic-bezier(该值允许你去自定义一个时间曲线)。

    transition-delay 动画延时时间基本用法与duration相同。

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, minimal-ui" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black" />
        <meta name="format-detection" content="telephone=no, email=no" />
        <title></title>
        <style>
            .menu {
                width: 2rem;
                height: 1.8rem;
                cursor: pointer;
                /* animation-duration: 0.2s;
                -webkit-animation:test 0.2s; */
                display: flex;
                flex-wrap: wrap;
            }
            .menu>span {
                width: 100%;
                height: 0;
                border: 1px solid #ccc;
            }
            .menu>span {
                /* animation: test; */
                /* height: .5rem; */
                transition: transform .2s linear;
            }
            .menu:hover>span:first-child {
                transform: rotate(-45deg);
            }
            .menu:hover>span:nth-child(2) {
                opacity: 0;
            }
            .menu:hover>span:nth-child(3) {
                transform: rotate(45deg);
            }
            
    
            @keyframes test {
                
            }
        </style>
    </head>
    <body>
        <div class="menu"><span></span><span></span><span></span></div>
        <div class="test"></div>
    </body>
    <script src="js/jquery.js"></script>
    <script>
    
    </script>
  • 相关阅读:
    bzoj2876 [Noi2012]骑行川藏
    关于线性基的一些理解
    bzoj2115 [Wc2011] Xor
    bzoj2884 albus就是要第一个出场
    bzoj2460 [BeiJing2011]元素
    bzoj2005 [Noi2010]能量采集
    关于积性函数的一些理解
    bzoj4300 绝世好题
    Servlet—文件上传
    JNDI—目录接口名
  • 原文地址:https://www.cnblogs.com/laiylm/p/14983570.html
Copyright © 2011-2022 走看看