• 文字流动效果


    <!doctype html>
    <html lang="en">

    <head>
        <meta charset="UTF-8">
        <meta name="viewport"
            content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>Document</title>
        <style>
            * {
                margin: 0;
                padding: 0;
            }

            body {
                height: 100vh;
                display: flex;
                justify-content: center;
                align-items: center;
                background-color: #333;
            }

            h1 {
                letter-spacing: 20px;
                font-size: 80px;
                background: linear-gradient(to right, #000, #fff, #000);
                /*渐变*/
                -webkit-background-clip: text;
                /*渐变文字*/
                background-size: 80%;
                /*范围*/
                background-repeat: no-repeat;
                /*不重复*/
                color: transparent;
                /*文字必须透明*/
                animation: textRun 4s infinite linear;
            }

            @keyframes textRun {
                0% {
                    background-position: -400%;
                }

                50% {
                    background-position: 400%;
                }

                100% {
                    background-position: -400%;
                }
            }
        </style>
    </head>

    <body>

        <h1>hello world</h1>

    </body>

    </html>
  • 相关阅读:
    让你在PC上调试Web App,UC浏览器发布开发者版
    多态
    深入理解DIP、IoC、DI以及IoC容器
    设计模式之迪米特原则(LOD)(最少知识原则)
    设计模式之合成/聚合利用原则(CARP)
    设计模式之接口隔离原则(ISP)
    设计模式之依赖倒转原则(DIP)
    设计模式之里氏代换原则(LSP)
    OO设计原则
    SQL分页
  • 原文地址:https://www.cnblogs.com/xushan03/p/16203549.html
Copyright © 2020-2023  润新知