38 lines
1.1 KiB
HTML
38 lines
1.1 KiB
HTML
<style>
|
|
@keyframes textGlow {
|
|
0%, 100% { text-shadow: 0 0 40px rgba(120,140,255,0.3), 0 0 80px rgba(120,140,255,0.1); }
|
|
50% { text-shadow: 0 0 60px rgba(120,140,255,0.5), 0 0 120px rgba(120,140,255,0.2); }
|
|
}
|
|
@keyframes textFloat {
|
|
0%, 100% { transform: translate(-50%, -50%) translateY(0px); }
|
|
50% { transform: translate(-50%, -50%) translateY(-8px); }
|
|
}
|
|
#wallpaper-text {
|
|
position: fixed;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
z-index: 1;
|
|
font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
|
|
font-size: 120px;
|
|
font-weight: 200;
|
|
color: rgba(255, 255, 255, 0.85);
|
|
letter-spacing: 8px;
|
|
white-space: nowrap;
|
|
animation: textGlow 4s ease-in-out infinite, textFloat 6s ease-in-out infinite;
|
|
user-select: none;
|
|
}
|
|
</style>
|
|
<div id="wallpaper-text"></div>
|
|
<script>
|
|
var el = document.getElementById('wallpaper-text');
|
|
if (el) {
|
|
var text = 'DREAM';
|
|
if (window.wallpaperText) text = window.wallpaperText;
|
|
el.textContent = text;
|
|
var len = text.length;
|
|
var size = Math.min(120, Math.floor(window.innerWidth * 0.8 / len));
|
|
el.style.fontSize = size + 'px';
|
|
}
|
|
</script>
|