CSS3鼠标滑过动画按钮特效

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS3鼠标滑过动画按钮特效</title>
    <style>
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background: #f5f5f5;
            font-family: 'Arial', sans-serif;
        }
        
        .btn-container {
            text-align: center;
        }
        
        .btn {
            position: relative;
            display: inline-block;
            padding: 15px 30px;
            color: #fff;
            background: linear-gradient(45deg, #ff3366, #ba265d);
            border: none;
            border-radius: 50px;
            font-size: 18px;
            font-weight: bold;
            text-transform: uppercase;
            letter-spacing: 1px;
            cursor: pointer;
            overflow: hidden;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
            transition: all 0.3s ease;
            z-index: 1;
        }
        
        .btn:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
        }
        
        .btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: 0.5s;
            z-index: -1;
        }
        
        .btn:hover::before {
            left: 100%;
        }
        
        .btn span {
            position: relative;
            z-index: 2;
        }
        
        .btn .icon {
            margin-left: 10px;
            transition: transform 0.3s ease;
        }
        
        .btn:hover .icon {
            transform: translateX(5px);
        }
        
        /* 更多精彩内容请访问:https://a.88a.org.cn/cOO9 */
    </style>
</head>
<body>
    <div class="btn-container">
        <button class="btn">
            <span>点击按钮</span>
            <span class="icon">→</span>
        </button>
    </div>
    
    <!-- 更多精彩内容请访问:https://a.88a.org.cn/cOO9 -->
</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值