• css 眼前一亮的hover


    截图

     

    传送门

     
     
    <!DOCTYPE html>
    <html lang="en">
    
    <head>
        <meta charset="UTF-8">
        <title>截图</title>
        <style>
    
        </style>
    </head>
    <style>
        button {
            border: 0;
            background: none;
            text-transform: uppercase;
            color: #4361ee;
            font-weight: bold;
            position: relative;
            outline: none;
            padding: 10px 20px;
            box-sizing: border-box;
        }
    
    
    
        button::before,
        button::after {
            box-sizing: inherit;
            position: absolute;
            content: '';
            border: 2px solid transparent;
            width: 0;
            height: 0;
        }
    
        /* button::after {
            bottom: 0;
            right: 0;
        } */
    
        button::before,
        button::after {
            top: 0;
            left: 0;
        }
    
        button:hover::before,
        button:hover::after {
            width: 100%;
            height: 100%;
        }
    
        button:hover::before {
            border-top-color: #4361ee;
            border-right-color: #4361ee;
            transition: width 0.3s, height 0.3s ease-out 0.3s;
        }
    
        button:hover::after {
            border-bottom-color: #4361ee;
            border-left-color: #4361ee;
            transition: height 0.3s, width 0.3s ease-out 0.3s;
        }
    </style>
    
    <body>
        <div id="draw-border">
            <button>Hover me</button>
        </div>
    </body>
    
    </html>

    截图

  • 相关阅读:
    正则表达式例子
    addevent兼容函数 && 阻止默认行为 && 阻止传播
    addevent
    区分总结innerHeight与clientHeight、innerWidth与clientWidth、scrollLeft与pageXOffset等属性
    setattribute兼容
    随机分配位置
    浏览器类型
    统计一个字符串中相同字符的个数
    Appium发送中文或其他语言的问题
    Appium同时连接多台手机进行测试(多线程)
  • 原文地址:https://www.cnblogs.com/chengfengchi/p/13594737.html
Copyright © 2020-2023  润新知