CCGO 构建产物部署至 TempLate/CCGO(旧文件移至 backup/ccgo);GVSite 已迁移残留的 Invite/Errors 旧页移至 backup/www;.gitignore 排除新工程
318 lines
14 KiB
HTML
318 lines
14 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>旋转时钟下落动画</title>
|
|
<style>
|
|
.clock-fall-container {
|
|
position: relative;
|
|
width: 100%;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
background-color: #f0f2f5;
|
|
}
|
|
|
|
.falling-clock {
|
|
position: absolute;
|
|
width: 100px;
|
|
height: 100px;
|
|
top: -150px;
|
|
left: 50%;
|
|
transform-origin: center;
|
|
animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
animation-fill-mode: forwards;
|
|
filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1));
|
|
}
|
|
|
|
/* 10个时钟的不同动画设置 */
|
|
.falling-clock-1 {
|
|
animation: clockFall1 2s ease-in-out 0.1s forwards, clockSpin 3s linear 0.1s forwards;
|
|
}
|
|
.falling-clock-2 {
|
|
animation: clockFall2 2.2s ease-in-out 0.2s forwards, clockSpin 3.5s linear 0.2s forwards;
|
|
}
|
|
.falling-clock-3 {
|
|
animation: clockFall3 2.4s ease-in-out 0.3s forwards, clockSpin 4s linear 0.3s forwards;
|
|
}
|
|
.falling-clock-4 {
|
|
animation: clockFall4 2.6s ease-in-out 0.4s forwards, clockSpin 3.2s linear 0.4s forwards;
|
|
}
|
|
.falling-clock-5 {
|
|
animation: clockFall5 2.8s ease-in-out 0.5s forwards, clockSpin 3.8s linear 0.5s forwards;
|
|
}
|
|
.falling-clock-6 {
|
|
animation: clockFall6 3s ease-in-out 0.6s forwards, clockSpin 4.2s linear 0.6s forwards;
|
|
}
|
|
.falling-clock-7 {
|
|
animation: clockFall7 3.2s ease-in-out 0.7s forwards, clockSpin 3.5s linear 0.7s forwards;
|
|
}
|
|
.falling-clock-8 {
|
|
animation: clockFall8 3.4s ease-in-out 0.8s forwards, clockSpin 4s linear 0.8s forwards;
|
|
}
|
|
.falling-clock-9 {
|
|
animation: clockFall9 3.6s ease-in-out 0.9s forwards, clockSpin 3.7s linear 0.9s forwards;
|
|
}
|
|
.falling-clock-10 {
|
|
animation: clockFall10 3.8s ease-in-out 1s forwards, clockSpin 4.5s linear 1s forwards;
|
|
}
|
|
|
|
/* 下落动画关键帧 */
|
|
@keyframes clockFall1 {
|
|
to { top: 10%; left: 10%; transform: rotate(0deg) scale(1.2); }
|
|
}
|
|
@keyframes clockFall2 {
|
|
to { top: 15%; left: 30%; transform: rotate(0deg) scale(1.3); }
|
|
}
|
|
@keyframes clockFall3 {
|
|
to { top: 20%; left: 50%; transform: rotate(0deg) scale(1.1); }
|
|
}
|
|
@keyframes clockFall4 {
|
|
to { top: 25%; left: 70%; transform: rotate(0deg) scale(1.4); }
|
|
}
|
|
@keyframes clockFall5 {
|
|
to { top: 40%; left: 15%; transform: rotate(0deg) scale(1.2); }
|
|
}
|
|
@keyframes clockFall6 {
|
|
to { top: 50%; left: 35%; transform: rotate(0deg) scale(1.5); }
|
|
}
|
|
@keyframes clockFall7 {
|
|
to { top: 60%; left: 65%; transform: rotate(0deg) scale(1.3); }
|
|
}
|
|
@keyframes clockFall8 {
|
|
to { top: 70%; left: 85%; transform: rotate(0deg) scale(1.1); }
|
|
}
|
|
@keyframes clockFall9 {
|
|
to { top: 80%; left: 25%; transform: rotate(0deg) scale(1.4); }
|
|
}
|
|
@keyframes clockFall10 {
|
|
to { top: 85%; left: 75%; transform: rotate(0deg) scale(1.2); }
|
|
}
|
|
|
|
/* 旋转动画关键帧 - 会慢慢停下来 */
|
|
@keyframes clockSpin {
|
|
0% { transform: rotate(0deg) scale(1); }
|
|
70% { transform: rotate(720deg) scale(var(--target-scale)); }
|
|
100% { transform: rotate(720deg) scale(var(--target-scale)); }
|
|
}
|
|
|
|
/* 时钟指针样式 */
|
|
.clock-face {
|
|
width: 100%;
|
|
height: 100%;
|
|
position: relative;
|
|
}
|
|
|
|
.clock-center {
|
|
position: absolute;
|
|
width: 6px;
|
|
height: 6px;
|
|
background: #333;
|
|
border-radius: 50%;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
z-index: 10;
|
|
}
|
|
|
|
.clock-hand {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform-origin: left center;
|
|
}
|
|
|
|
.clock-hand-hour {
|
|
width: 30px;
|
|
height: 4px;
|
|
margin-top: -2px;
|
|
background: #333;
|
|
animation: hourHandMove 12s infinite linear;
|
|
}
|
|
|
|
.clock-hand-minute {
|
|
width: 40px;
|
|
height: 2px;
|
|
margin-top: -1px;
|
|
background: #333;
|
|
animation: minuteHandMove 6s infinite linear;
|
|
}
|
|
|
|
/* 每个时钟不同的初始角度 */
|
|
.clock-1 .clock-hand-hour { transform: rotate(-30deg); }
|
|
.clock-1 .clock-hand-minute { transform: rotate(-180deg); }
|
|
|
|
.clock-2 .clock-hand-hour { transform: rotate(-60deg); }
|
|
.clock-2 .clock-hand-minute { transform: rotate(-90deg); }
|
|
|
|
.clock-3 .clock-hand-hour { transform: rotate(-120deg); }
|
|
.clock-3 .clock-hand-minute { transform: rotate(-270deg); }
|
|
|
|
.clock-4 .clock-hand-hour { transform: rotate(-150deg); }
|
|
.clock-4 .clock-hand-minute { transform: rotate(-45deg); }
|
|
|
|
.clock-5 .clock-hand-hour { transform: rotate(-210deg); }
|
|
.clock-5 .clock-hand-minute { transform: rotate(-135deg); }
|
|
|
|
.clock-6 .clock-hand-hour { transform: rotate(-240deg); }
|
|
.clock-6 .clock-hand-minute { transform: rotate(-315deg); }
|
|
|
|
.clock-7 .clock-hand-hour { transform: rotate(-270deg); }
|
|
.clock-7 .clock-hand-minute { transform: rotate(-225deg); }
|
|
|
|
.clock-8 .clock-hand-hour { transform: rotate(-300deg); }
|
|
.clock-8 .clock-hand-minute { transform: rotate(-360deg); }
|
|
|
|
.clock-9 .clock-hand-hour { transform: rotate(-330deg); }
|
|
.clock-9 .clock-hand-minute { transform: rotate(-160deg); }
|
|
|
|
.clock-10 .clock-hand-hour { transform: rotate(-360deg); }
|
|
.clock-10 .clock-hand-minute { transform: rotate(-200deg); }
|
|
|
|
@keyframes hourHandMove {
|
|
from { transform: rotate(var(--hour-start, -90deg)); }
|
|
to { transform: rotate(calc(var(--hour-start, -90deg) + 360deg)); }
|
|
}
|
|
|
|
@keyframes minuteHandMove {
|
|
from { transform: rotate(var(--minute-start, -90deg)); }
|
|
to { transform: rotate(calc(var(--minute-start, -90deg) + 360deg)); }
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="clock-fall-container">
|
|
<!-- 10个时钟,每个都有不同的时间 -->
|
|
<div class="falling-clock falling-clock-1 clock-1" style="--target-scale:1.2; --hour-start:-30deg; --minute-start:-180deg">
|
|
<div class="clock-face">
|
|
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
<circle cx="12" cy="12" r="10" fill="none" stroke="#4285F4" stroke-width="1.5"/>
|
|
</svg>
|
|
<div class="clock-hand clock-hand-hour"></div>
|
|
<div class="clock-hand clock-hand-minute"></div>
|
|
<div class="clock-center"></div>
|
|
</div>
|
|
</div>
|
|
<div class="falling-clock falling-clock-2 clock-2" style="--target-scale:1.3; --hour-start:-60deg; --minute-start:-90deg">
|
|
<div class="clock-face">
|
|
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
<circle cx="12" cy="12" r="10" fill="none" stroke="#EA4335" stroke-width="1.5"/>
|
|
</svg>
|
|
<div class="clock-hand clock-hand-hour"></div>
|
|
<div class="clock-hand clock-hand-minute"></div>
|
|
<div class="clock-center"></div>
|
|
</div>
|
|
</div>
|
|
<div class="falling-clock falling-clock-3 clock-3" style="--target-scale:1.1; --hour-start:-120deg; --minute-start:-270deg">
|
|
<div class="clock-face">
|
|
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
<circle cx="12" cy="12" r="10" fill="none" stroke="#34A853" stroke-width="1.5"/>
|
|
</svg>
|
|
<div class="clock-hand clock-hand-hour"></div>
|
|
<div class="clock-hand clock-hand-minute"></div>
|
|
<div class="clock-center"></div>
|
|
</div>
|
|
</div>
|
|
<div class="falling-clock falling-clock-4 clock-4" style="--target-scale:1.4; --hour-start:-150deg; --minute-start:-45deg">
|
|
<div class="clock-face">
|
|
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
<circle cx="12" cy="12" r="10" fill="none" stroke="#FBBC05" stroke-width="1.5"/>
|
|
</svg>
|
|
<div class="clock-hand clock-hand-hour"></div>
|
|
<div class="clock-hand clock-hand-minute"></div>
|
|
<div class="clock-center"></div>
|
|
</div>
|
|
</div>
|
|
<div class="falling-clock falling-clock-5 clock-5" style="--target-scale:1.2; --hour-start:-210deg; --minute-start:-135deg">
|
|
<div class="clock-face">
|
|
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
<circle cx="12" cy="12" r="10" fill="none" stroke="#673AB7" stroke-width="1.5"/>
|
|
</svg>
|
|
<div class="clock-hand clock-hand-hour"></div>
|
|
<div class="clock-hand clock-hand-minute"></div>
|
|
<div class="clock-center"></div>
|
|
</div>
|
|
</div>
|
|
<div class="falling-clock falling-clock-6 clock-6" style="--target-scale:1.5; --hour-start:-240deg; --minute-start:-315deg">
|
|
<div class="clock-face">
|
|
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
<circle cx="12" cy="12" r="10" fill="none" stroke="#9C27B0" stroke-width="1.5"/>
|
|
</svg>
|
|
<div class="clock-hand clock-hand-hour"></div>
|
|
<div class="clock-hand clock-hand-minute"></div>
|
|
<div class="clock-center"></div>
|
|
</div>
|
|
</div>
|
|
<div class="falling-clock falling-clock-7 clock-7" style="--target-scale:1.3; --hour-start:-270deg; --minute-start:-225deg">
|
|
<div class="clock-face">
|
|
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
<circle cx="12" cy="12" r="10" fill="none" stroke="#3F51B5" stroke-width="1.5"/>
|
|
</svg>
|
|
<div class="clock-hand clock-hand-hour"></div>
|
|
<div class="clock-hand clock-hand-minute"></div>
|
|
<div class="clock-center"></div>
|
|
</div>
|
|
</div>
|
|
<div class="falling-clock falling-clock-8 clock-8" style="--target-scale:1.1; --hour-start:-300deg; --minute-start:-360deg">
|
|
<div class="clock-face">
|
|
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
<circle cx="12" cy="12" r="10" fill="none" stroke="#00BCD4" stroke-width="1.5"/>
|
|
</svg>
|
|
<div class="clock-hand clock-hand-hour"></div>
|
|
<div class="clock-hand clock-hand-minute"></div>
|
|
<div class="clock-center"></div>
|
|
</div>
|
|
</div>
|
|
<div class="falling-clock falling-clock-9 clock-9" style="--target-scale:1.4; --hour-start:-330deg; --minute-start:-160deg">
|
|
<div class="clock-face">
|
|
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
<circle cx="12" cy="12" r="10" fill="none" stroke="#FF9800" stroke-width="1.5"/>
|
|
</svg>
|
|
<div class="clock-hand clock-hand-hour"></div>
|
|
<div class="clock-hand clock-hand-minute"></div>
|
|
<div class="clock-center"></div>
|
|
</div>
|
|
</div>
|
|
<div class="falling-clock falling-clock-10 clock-10" style="--target-scale:1.2; --hour-start:-360deg; --minute-start:-200deg">
|
|
<div class="clock-face">
|
|
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
<circle cx="12" cy="12" r="10" fill="none" stroke="#E91E63" stroke-width="1.5"/>
|
|
</svg>
|
|
<div class="clock-hand clock-hand-hour"></div>
|
|
<div class="clock-hand clock-hand-minute"></div>
|
|
<div class="clock-center"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const container = document.querySelector('.clock-fall-container');
|
|
const clocks = document.querySelectorAll('.falling-clock');
|
|
|
|
function resetAnimations() {
|
|
clocks.forEach(clock => {
|
|
// 重置动画
|
|
clock.style.animation = 'none';
|
|
void clock.offsetWidth;
|
|
|
|
// 获取时钟的类名和对应的动画
|
|
const clockClass = Array.from(clock.classList)
|
|
.find(cls => cls.startsWith('falling-clock-'));
|
|
|
|
if (clockClass) {
|
|
const num = clockClass.replace('falling-clock-', '');
|
|
clock.style.animation = `clockFall${num} 2s ease-in-out 0.${num}s forwards, clockSpin 3s linear 0.${num}s forwards`;
|
|
}
|
|
});
|
|
}
|
|
|
|
// 初始加载时启动动画
|
|
resetAnimations();
|
|
|
|
// 点击容器重新开始动画
|
|
container.addEventListener('click', resetAnimations);
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |