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>
  • 相关阅读:
    ubuntu下cmake自动化编译的一个例子
    KL变换和PCA的数学推导
    tensorflow c++ API加载.pb模型文件并预测图片
    tensorflow c++接口的编译安装与一些问题记录
    深度增强学习--总结下吧
    深度增强学习--DPPO
    深度增强学习--DDPG
    深度增强学习--A3C
    tomcat远程调试
    springboot问题记录
  • 原文地址:https://www.cnblogs.com/laiylm/p/14983570.html
Copyright © 2011-2022 走看看