【button 特效】

button 特效

在这里插入图片描述

在这里插入图片描述

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>特效</title>
</head>
<style>
    *{
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    body{
        background-color: #2c3e50;
    }
    a{
        display: block;
        width: 200px;
        height: 60px;
        text-align: center;
        line-height: 60px;
        /* 自适应居中 */
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        margin: auto;
        color: aqua;
        font-size: 20px;
        font-weight: bold;
        text-decoration: none;
        overflow: hidden;
    }
    a span{
        position: absolute;
        display: block;
        height: 5px;
        width: 100%;
        background-color: rgb(68,222,139);
    }
    span:nth-child(1){
        background: linear-gradient(90deg,transparent,#ff4242);
        top:0;
        /* left:-200px; */
        /* 动画 */
       
        animation: transverse 2s ease infinite;
    }
    span:nth-child(2){
        width: 5px;
        height: 100%;
        background: linear-gradient(180deg,transparent,#ff1fbf);
        /* top: -60px; */
        left:195px;
        /* 动画 */
        animation: vertical 2s ease infinite;
        animation-delay: 0.5s;
    }
    span:nth-child(3){
        background: linear-gradient(270deg,transparent,#f4ff1a);
        bottom:0;
        /* right: -200px; */
        /* 动画 */
        animation: transverse2 2s ease infinite;
        animation-delay: 1s;

    }
    span:nth-child(4){
        width: 5px;
        height: 100%;
        background: linear-gradient(0,transparent,#1aff4f);
        bottom:0;
        /* right:195px; */
        /* 动画 */
        animation: vertical2 2s ease infinite;
        animation-delay: 1.5s;

    }
    @keyframes transverse {
         0%{left: -200px;}
         50%,
         100%{left: 200px;}
    }
    @keyframes transverse2 {
         0%{left: 200px;}
         50%,
         100%{left: -200px;}
    }
    @keyframes vertical {
         0%{top: -60px;}
         50%,
         100%{top: 60px;}
    }
    @keyframes vertical2 {
         0%{top: 60px;}
         50%,
         100%{top: -60px;}
    }
    a:hover span{
        animation-play-state: paused;
        display: none;
    }
    a:hover{
        background: #03e9f4;
        color: #050801;
        box-shadow: 0 0 5px #03e9f4, 0 0 25px #03e9f4, 0 0 50px #03e9f4, 0 0 20px #03e9f4;
    }
</style>
<body>
    <a href="#">
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        BUTTON
    </a>
</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值