• CSS 文字高光效果


    CSS文字高光效果,可以用来当Loading页面

    一、利用文字背景

    <!DOCTYPE html>
    <html lang="zh">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title></title>
        <style type="text/css">
            * {margin: 0;padding: 0;}
            .q-loading-2 {position: fixed;top: 0;left: 0;right: 0;bottom: 0;background-color: #ffebeb;
                display: flex;justify-content: center;align-items: center;}
            .q-loading-2-inner {font-size: 40px;font-weight: bold;background: #ccc linear-gradient(135deg,transparent 25%,transparent 40%,rgba(255,255,255, 1) 40%,
                rgba(255,255,255, 1) 60%,transparent 60%, transparent);background-size: 60px 60px;background-repeat: no-repeat;
                -webkit-background-clip: text;-webkit-text-fill-color: transparent;animation: scratchy 1.5s linear infinite;
                }
            @keyframes scratchy {
                0% {
                    background-position: -100% 0;
                }
                100% {
                    background-position: 130% 0;
                }
            }
        </style>
    </head>
    <body>
        <div id="app">
            <div class="q-loading-2">
                <div class="q-loading-2-inner" @click="$t.openHaha">
                    系统联盟
                </div>
            </div>
        </div>
    </body>
    </html>
    View Code

    二、利用伪元素

    <!DOCTYPE html>
    <html lang="zh">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title></title>
        <style type="text/css">
            * {margin: 0;padding: 0;}
            .q-loading-3 {position: fixed;top: 0;left: 0;right: 0;bottom: 0;background-color: #ffffff;
                display: flex;justify-content: center;align-items: center;}
            .q-loading-3::before {content: '系统联盟';position: absolute;top: 36%;left: 50%;white-space: nowrap;
                transform: translateX(-50%);height: 50px;color: #d7d7d7;font-size: 36px;font-weight: bold;letter-spacing: 3px;}
            .q-loading-3::after {content: '';position: absolute;top: 36%;left: 20%; 12px;
                transform: translateX(-50%);height: 50px;background-color: rgba(255, 255, 255, .5);transform: skew(20deg);
                animation: 1.8s loadingframe infinite;}
            @keyframes loadingframe{
                from{left: 20%;}
                to{left: 80%;}
            }
        </style>
    </head>
    <body>
        <div id="app">
            <div class="q-loading-3"></div>
        </div>
    </body>
    </html>
    

      

  • 相关阅读:
    php设计模式-装饰器模式
    php设计模式-观察者模式
    play-with-docker搭配ffsend完成文件上传及下载(解决从docker hub拉取镜像慢问题)
    java执行命令行,以及解决卡死问题
    在docker容器中调用docker命令
    MIME 类型,ContentType
    大文件下载---之内存溢出问题解决
    OperationCenter Docker运行环境及其依赖启动脚本
    快速获取批量处理Docker镜像SQL语句
    解决达梦数据库新增大字段报错问题
  • 原文地址:https://www.cnblogs.com/qiuxd/p/12972446.html
Copyright © 2020-2023  润新知