zoukankan      html  css  js  c++  java
  • css | 鼠标经过样式

    1、循序渐进

        <style>
            /* 基础样式(删除) */
            
            body,
            html {
                padding: 0;
                margin: 0;
                height: 100vh;
                width: 100vw;
                display: flex;
                justify-content: center;
                align-items: center;
                flex-wrap: wrap;
            }
            
            .dxd_wdh {
                width: 300px;
                height: 300px;
                background-color: rgb(43, 193, 219);
                position: relative;
            }
            /* 基础样式(删除) */
            
             :root {
                --color: rgb(118, 120, 223);
            }
            
            .dxd_wdh:before,
            .dxd_wdh:after {
                content: "";
                display: block;
                width: 0;
                height: 0;
                border: 3px solid transparent;
                box-sizing: border-box;
                position: absolute;
            }
            
            .dxd_wdh:before {
                top: 0;
                left: 0;
                transition: border-color 0s ease-in 0.8s, width 0.2s ease-in 0.6s, height 0.2s ease-in 0.4s;
            }
            
            .dxd_wdh:after {
                right: 0;
                bottom: 0;
                transition: border-color 0s ease-in 0.4s, width 0.2s ease-in 0.2s, height 0.2s ease-in;
            }
            
            .dxd_wdh:hover:before {
                width: 100%;
                height: 100%;
                transition: width 0.2s ease-in, height 0.2s ease-in 0.2s;
                border-top-color: var(--color);
                border-right-color: var(--color);
            }
            
            .dxd_wdh:hover:after {
                width: 100%;
                height: 100%;
                transition: border-color 0s ease-in 0.4s, width 0.2s ease-in 0.4s, height 0.3s ease-in 0.6s;
                border-bottom-color: var(--color);
                border-left-color: var(--color);
            }
        </style>
        <div class="dxd_wdh"></div>
  • 相关阅读:
    VSCODE极简配置(备份)
    顺时针打印矩阵--剑指offer
    回文链表 leetcode
    E
    E. Kleof&#225;š and the n-thlon
    单调栈板子
    D
    CodeForces 600E Lomsat gelral(线段树合并)
    C# 面试宝典
    JavaScript 火花效果
  • 原文地址:https://www.cnblogs.com/111wdh/p/mouse_style.html
Copyright © 2011-2022 走看看