微件:Intro:修订间差异
来自SOKA CAFE
第1行: | 第1行: | ||
< | <<!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> | |||
/* 基础样式重置 */ | |||
* { | |||
margin: 0; | |||
padding: 0; | |||
box-sizing: border-box; | |||
} | |||
<h1 class="intro-title"> | body { | ||
font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; | |||
</ | overflow: hidden; | ||
height: 100vh; | |||
} | |||
/* 动画容器 (全屏背景) */ | |||
.intro-container { | |||
position: fixed; | |||
top: 0; | |||
left: 0; | |||
width: 100%; | |||
height: 100%; | |||
background: radial-gradient(ellipse at center, rgba(34, 34, 34, 0.9) 0%, rgba(10, 10, 10, 0.98) 100%); | |||
z-index: 9999; | |||
display: flex; | |||
justify-content: center; | |||
align-items: center; | |||
opacity: 0; | |||
transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1); | |||
} | |||
/* 花瓣装饰背景 */ | |||
.petals-background { | |||
position: absolute; | |||
width: 100%; | |||
height: 100%; | |||
opacity: 0.15; | |||
pointer-events: none; | |||
} | |||
.petal { | |||
position: absolute; | |||
background: rgba(255, 255, 255, 0.6); | |||
border-radius: 50% 50% 50% 0; | |||
width: 20px; | |||
height: 20px; | |||
opacity: 0; | |||
animation: fallDown 15s linear infinite; | |||
} | |||
@keyframes fallDown { | |||
0% { | |||
transform: translateY(-100px) rotate(0deg); | |||
opacity: 0; | |||
} | |||
10% { | |||
opacity: 0.6; | |||
} | |||
90% { | |||
opacity: 0.4; | |||
} | |||
100% { | |||
transform: translateY(100vh) rotate(360deg); | |||
opacity: 0; | |||
} | |||
} | |||
/* 进度条 */ | |||
.progress-container { | |||
position: absolute; | |||
bottom: 60px; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
width: 280px; | |||
height: 3px; | |||
background: rgba(255, 255, 255, 0.2); | |||
border-radius: 4px; | |||
overflow: hidden; | |||
} | |||
.progress-bar { | |||
height: 100%; | |||
width: 0%; | |||
background: linear-gradient(90deg, #a17f3a, #d6b161, #a17f3a); | |||
border-radius: 4px; | |||
transition: width 0.3s ease; | |||
} | |||
/* 动画内容区 */ | |||
.intro-content { | |||
text-align: center; | |||
filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.15)); | |||
position: relative; | |||
} | |||
/* LOGO样式和动画 */ | |||
.intro-logo { | |||
max-width: 180px; | |||
height: auto; | |||
display: block; | |||
margin: 0 auto 25px; | |||
opacity: 0; | |||
transform: translateY(20px) scale(0.9); | |||
transition: all 1.5s cubic-bezier(0.23, 1, 0.32, 1); | |||
border-radius: 50%; | |||
padding: 10px; | |||
background: radial-gradient(ellipse at center, rgba(161, 127, 58, 0.2) 0%, transparent 70%); | |||
} | |||
/* 标题文字样式和动画 */ | |||
.intro-title { | |||
color: #FFFFFF; | |||
font-size: 3.2em; | |||
font-weight: 500; | |||
text-shadow: 0 0 10px rgba(255, 255, 255, 0.3), 0 0 20px rgba(0, 0, 0, 0.5); | |||
letter-spacing: 3px; | |||
margin-bottom: 10px; | |||
opacity: 0; | |||
transform: scale(0.95); | |||
transition: all 1.5s cubic-bezier(0.23, 1, 0.32, 1); | |||
} | |||
/* 副标题 */ | |||
.intro-subtitle { | |||
color: rgba(255, 255, 255, 0.7); | |||
font-size: 1.2em; | |||
font-weight: 300; | |||
letter-spacing: 2px; | |||
margin-top: 10px; | |||
opacity: 0; | |||
transform: translateY(10px); | |||
transition: all 1.2s cubic-bezier(0.23, 1, 0.32, 1) 0.6s; | |||
} | |||
/* 控制按钮 */ | |||
.intro-controls { | |||
position: absolute; | |||
bottom: 20px; | |||
right: 20px; | |||
display: flex; | |||
gap: 10px; | |||
} | |||
.control-btn { | |||
background: rgba(255, 255, 255, 0.1); | |||
border: none; | |||
color: white; | |||
padding: 8px 15px; | |||
border-radius: 20px; | |||
cursor: pointer; | |||
font-size: 0.9em; | |||
transition: all 0.3s ease; | |||
backdrop-filter: blur(5px); | |||
} | |||
.control-btn:hover { | |||
background: rgba(255, 255, 255, 0.2); | |||
} | |||
/* 花瓣装饰 */ | |||
.decoration { | |||
position: absolute; | |||
width: 100px; | |||
height: 100px; | |||
opacity: 0.1; | |||
pointer-events: none; | |||
} | |||
.decoration-1 { | |||
top: 20%; | |||
left: 15%; | |||
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50,0 C60,20 80,30 100,50 C80,60 60,80 50,100 C40,80 20,60 0,50 C20,30 40,20 50,0Z" fill="%23d6b161"/></svg>') no-repeat center; | |||
background-size: contain; | |||
animation: float 12s ease-in-out infinite; | |||
} | |||
.decoration-2 { | |||
bottom: 20%; | |||
right: 15%; | |||
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50,0 C60,20 80,30 100,50 C80,60 60,80 50,100 C40,80 20,60 0,50 C20,30 40,20 50,0Z" fill="%23a17f3a"/></svg>') no-repeat center; | |||
background-size: contain; | |||
animation: float 15s ease-in-out infinite reverse; | |||
} | |||
@keyframes float { | |||
0%, 100% { transform: translateY(0) rotate(0deg); } | |||
50% { transform: translateY(-20px) rotate(10deg); } | |||
} | |||
/* === 动画触发类 === */ | |||
.intro-container.is-active .intro-logo { | |||
opacity: 1; | |||
transform: translateY(0) scale(1); | |||
transition-delay: 0.2s; | |||
} | |||
.intro-container.is-active .intro-title { | |||
opacity: 1; | |||
transform: scale(1); | |||
transition-delay: 0.4s; | |||
} | |||
.intro-container.is-active .intro-subtitle { | |||
opacity: 1; | |||
transform: translateY(0); | |||
} | |||
/* 响应式设计 */ | |||
@media (max-width: 768px) { | |||
.intro-title { | |||
font-size: 2.2em; | |||
} | |||
.intro-subtitle { | |||
font-size: 1em; | |||
} | |||
.intro-logo { | |||
max-width: 130px; | |||
} | |||
.progress-container { | |||
width: 200px; | |||
} | |||
.control-btn { | |||
padding: 6px 12px; | |||
font-size: 0.8em; | |||
} | |||
} | |||
@media (max-width: 480px) { | |||
.intro-title { | |||
font-size: 1.8em; | |||
letter-spacing: 1px; | |||
} | |||
.intro-subtitle { | |||
font-size: 0.9em; | |||
letter-spacing: 1px; | |||
} | |||
.intro-logo { | |||
max-width: 100px; | |||
} | |||
.progress-container { | |||
width: 180px; | |||
bottom: 50px; | |||
} | |||
.control-btn { | |||
padding: 5px 10px; | |||
font-size: 0.7em; | |||
} | |||
.intro-controls { | |||
bottom: 15px; | |||
right: 15px; | |||
} | |||
} | |||
</style> | |||
</head> | |||
<body> | |||
<div id="intro-container" class="intro-container"> | |||
<div class="petals-background" id="petals-container"></div> | |||
<div class="decoration decoration-1"></div> | |||
<div class="decoration decoration-2"></div> | |||
<div class="intro-content"> | |||
<img src="https://soka.cafe/images/b/b3/%E5%85%AB%E5%8F%B6%E8%8E%B2%E5%8D%8E%E4%BC%9A%E7%A4%BE.jpg" alt="八叶莲华会社" class="intro-logo"> | |||
<h1 class="intro-title"> | |||
八叶莲华会社 | |||
</h1> | |||
<p class="intro-subtitle">传统与创新的完美融合</p> | |||
</div> | |||
<div class="progress-container"> | |||
<div class="progress-bar" id="progress-bar"></div> | |||
</div> | |||
<div class="intro-controls"> | |||
<button class="control-btn" id="skip-btn">跳过</button> | |||
<button class="control-btn" id="mute-btn">🔊</button> | |||
</div> | |||
</div> | </div> | ||
}, | <script> | ||
}); | document.addEventListener('DOMContentLoaded', function() { | ||
</script><noinclude> | const container = document.getElementById('intro-container'); | ||
const progressBar = document.getElementById('progress-bar'); | |||
const skipBtn = document.getElementById('skip-btn'); | |||
const muteBtn = document.getElementById('mute-btn'); | |||
const petalsContainer = document.getElementById('petals-container'); | |||
let audioContext; | |||
let oscillator; | |||
let isMuted = false; | |||
let animationDuration = 4500; // 动画总时长(毫秒) | |||
// 创建花瓣背景 | |||
function createPetals() { | |||
const petalCount = 15; | |||
for (let i = 0; i < petalCount; i++) { | |||
const petal = document.createElement('div'); | |||
petal.classList.add('petal'); | |||
// 随机位置和大小 | |||
const size = Math.random() * 15 + 10; | |||
petal.style.width = `${size}px`; | |||
petal.style.height = `${size}px`; | |||
petal.style.left = `${Math.random() * 100}%`; | |||
petal.style.animationDelay = `${Math.random() * 10}s`; | |||
petal.style.animationDuration = `${Math.random() * 10 + 10}s`; | |||
// 随机旋转和颜色 | |||
petal.style.transform = `rotate(${Math.random() * 90}deg)`; | |||
petal.style.background = `rgba(214, 177, 97, ${Math.random() * 0.5 + 0.3})`; | |||
petalsContainer.appendChild(petal); | |||
} | |||
} | |||
// 创建音效 | |||
function createSound() { | |||
try { | |||
audioContext = new (window.AudioContext || window.webkitAudioContext)(); | |||
oscillator = audioContext.createOscillator(); | |||
const gainNode = audioContext.createGain(); | |||
oscillator.type = 'sine'; | |||
oscillator.frequency.setValueAtTime(440, audioContext.currentTime); | |||
gainNode.gain.setValueAtTime(0.1, audioContext.currentTime); | |||
oscillator.connect(gainNode); | |||
gainNode.connect(audioContext.destination); | |||
oscillator.start(); | |||
// 淡出音效 | |||
setTimeout(() => { | |||
gainNode.gain.exponentialRampToValueAtTime(0.001, audioContext.currentTime + 1.2); | |||
}, animationDuration - 1200); | |||
} catch (e) { | |||
console.log('音频上下文不支持'); | |||
} | |||
} | |||
// 跳过动画 | |||
function skipAnimation() { | |||
container.style.opacity = '0'; | |||
if (oscillator) { | |||
oscillator.stop(); | |||
} | |||
setTimeout(() => { | |||
container.style.display = 'none'; | |||
}, 1200); | |||
} | |||
// 切换静音 | |||
function toggleMute() { | |||
if (!audioContext) return; | |||
if (isMuted) { | |||
audioContext.resume(); | |||
muteBtn.textContent = '🔊'; | |||
} else { | |||
audioContext.suspend(); | |||
muteBtn.textContent = '🔇'; | |||
} | |||
isMuted = !isMuted; | |||
} | |||
// 初始化 | |||
function init() { | |||
createPetals(); | |||
// 触发入场动画 | |||
requestAnimationFrame(() => { | |||
container.style.opacity = '1'; | |||
container.classList.add('is-active'); | |||
// 开始进度条动画 | |||
let progress = 0; | |||
const interval = 30; | |||
const increments = interval / animationDuration * 100; | |||
const progressInterval = setInterval(() => { | |||
progress += increments; | |||
progressBar.style.width = `${progress}%`; | |||
if (progress >= 100) { | |||
clearInterval(progressInterval); | |||
} | |||
}, interval); | |||
// 创建音效(需要用户交互) | |||
document.body.addEventListener('click', function() { | |||
if (!audioContext) { | |||
createSound(); | |||
} | |||
}, { once: true }); | |||
}); | |||
// 设置自动结束 | |||
setTimeout(skipAnimation, animationDuration); | |||
// 事件监听 | |||
skipBtn.addEventListener('click', skipAnimation); | |||
muteBtn.addEventListener('click', toggleMute); | |||
} | |||
// 启动初始化 | |||
init(); | |||
}); | |||
</script> | |||
</body> | |||
</html><noinclude> | |||
{{#Widget:Intro}} | {{#Widget:Intro}} | ||
</noinclude> | </noinclude> |
2025年8月30日 (六) 06:30的版本
<<!DOCTYPE html>

八叶莲华会社
传统与创新的完美融合

八叶莲华会社
“中华Air本文化的活化石,了解Air本文化的最好途径”