• css故障文字动画


    免费分享95套java实战项目,不仅有源码还有对应的开发视频,关注公众号『勾玉技术』回复“95”即可获取
    首先给内容上hover和before,

    .glitch:hover:before {
        text-shadow: 4px 0 #ff3f1a;
        animation: glitch-loop-1 .8s infinite ease-in-out alternate-reverse;
    }
    

    然后是hover和after:

    .glitch:hover:after {
        text-shadow: -5px 0 #00a7e0;
        animation: glitch-loop-2 .8s infinite ease-in-out alternate-reverse;
    }
    

    定义好动画glitch-loop-1:

    @-webkit-keyframes glitch-loop-1{0%{clip:rect(36px,9999px,9px,0)}25%{clip:rect(25px,9999px,99px,0)}50%{clip:rect(50px,9999px,102px,0)}75%{clip:rect(30px,9999px,92px,0)}100%{clip:rect(91px,9999px,98px,0)}}
    @keyframes glitch-loop-1{0%{clip:rect(36px,9999px,9px,0)}25%{clip:rect(25px,9999px,99px,0)}50%{clip:rect(50px,9999px,102px,0)}75%{clip:rect(30px,9999px,92px,0)}100%{clip:rect(91px,9999px,98px,0)}}
    

    单独的before:

    .glitch:before {
        left: -1px;
        text-shadow: 1px 0 #ff3f1a;
    }
    

    单独的after:

    .glitch:after {
        left: 1px;
        text-shadow: -1px 0 #00a7e0;
    }
    

    共同:

    .glitch:after, .glitch:before {
        content: attr(data-text);
        position: absolute;
        top: 0;
         100%;
        background: rgba(0,0,0,0);
        clip: rect(0,0,0,0);
    }
    
  • 相关阅读:
    WebApi实现自定义错误日志
    WebApi实现IHttpControllerSelector问题
    动态属性ExpandoObject
    SQL远程连接
    HTML空格占位
    SQL生僻字模糊查询
    python中的字符串
    idea闪退
    lineNumber: 1; columnNumber: 1; 前言中不允许有内容。
    linux下后台启动weblogic
  • 原文地址:https://www.cnblogs.com/bronya0/p/14181745.html
Copyright © 2020-2023  润新知