HTML5收音机404动画特效

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

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>收音机 404 动画特效</title>
    <style>
        body {
            background-color: #000;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }

        #radio-container {
            position: relative;
            width: 300px;
            height: 200px;
        }

        #radio {
            width: 100%;
            height: 100%;
            background-color: #333;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
            position: relative;
        }

        #antenna {
            width: 2px;
            height: 80px;
            background-color: #fff;
            position: absolute;
            top: -80px;
            left: 50%;
            transform-origin: bottom center;
            animation: antennaWave 2s infinite alternate;
        }

        #speaker {
            width: 80%;
            height: 60%;
            background-color: #222;
            border-radius: 5px;
            position: absolute;
            top: 20%;
            left: 10%;
            display: flex;
            justify-content: center;
            align-items: center;
            color: #ff0000;
            font-size: 2rem;
            overflow: hidden;
        }

        #message {
            white-space: nowrap;
            animation: scrollText 10s linear infinite;
        }

        #link {
            position: absolute;
            bottom: 20px;
            right: 20px;
        }

        #link a {
            color: white;
            text-decoration: none;
            background-color: rgba(0, 0, 0, 0.5);
            padding: 10px 20px;
            border-radius: 5px;
            transition: background-color 0.3s ease;
        }

        #link a:hover {
            background-color: rgba(0, 0, 0, 0.8);
        }

        @keyframes antennaWave {
            from {
                transform: rotate(-15deg);
            }
            to {
                transform: rotate(15deg);
            }
        }

        @keyframes scrollText {
            from {
                transform: translateX(100%);
            }
            to {
                transform: translateX(-100%);
            }
        }
    </style>
</head>

<body>
    <div id="radio-container">
        <div id="antenna"></div>
        <div id="radio">
            <div id="speaker">
                <div id="message">404 - Page Not Found</div>
            </div>
        </div>
    </div>
    <div id="link">
        <a href="https://www.99j.skin">www.99j.skin</a>
    </div>
</body>

</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值