css做出一个流光按钮

<!DOCTYPE html>
<html lang="en">

<head>
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">

    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">

    <META HTTP-EQUIV="Expires" CONTENT="0">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="viewport" id="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />


</head>
<style>
    html,
    body {
        height: 100%;
        margin: 0;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: rgb(7, 7, 7);
    }
    
    a {
        display: block;
        position: relative;
        /* display: flex; */
        /* justify-content: center;
        align-items: center; */
        margin: 100px;
        border-radius: 50px;
        color: #fff;
        height: 100px;
        width: 200px;
        text-align: center;
        line-height: 100px;
        text-decoration: none;
        text-transform: uppercase;
        font-size: 24px;
        background-image: linear-gradient(to right, #03a9f4, #f441a5, #ffeb3b, #09a8f4);
        background-size: 400%;
        z-index: 1;
    }
    
    a:before {
        content: '';
        position: absolute;
        top: -5px;
        bottom: -5px;
        left: -5px;
        right: -5px;
        border-radius: 50px;
        background-image: linear-gradient(to right, #03a9f4, #f441a5, #ffeb3b, #09a8f4);
        background-size: 400%;
        z-index: -1;
        filter: blur(5px);
    }
    
    a:hover {
        animation: sun 8s infinite;
    }
    
    a:hover::before {
        animation: sun 8s infinite;
    }
    
    @keyframes sun {
        100% {
            background-position: -400% 0;
        }
    }
    
    @media (max-width: 1120px) {
        html,
        body {
            height: 100%;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
        }
    }
    
    @media (max-width:500px) {
        html,
        body {
            height: 100%;
            width: 100%;
            margin: 0;
            padding: 0;
        }
        a {
            /* width: 40%; */
            margin: 10px;
            /* height: 10%; */
            /* font-size: 30px; */
            /* text-align: center; */
        }
    }
</style>

<body>

    <a class="shouye" href="./business.html">商家版</a>
    <a class="shouye" href="./personal-edition.html">个人版</a>

</body>


</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值