body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #f0f0f0;
font-family: sans-serif;
overflow: hidden;
}
.animated-text span {
font-size: 4em;
font-weight: bold;
color: #007bff;
display: inline-block; /* 各文字を独立したブロック要素として扱う */
opacity: 0; /* 初期状態では非表示 */
transform: translateY(20px); /* 初期状態では少し下に移動 */
animation: fade-up 1s forwards; /* fade-upアニメーションを適用 */
}
/* 各文字にアニメーション遅延を設定 */
.animated-text span:nth-child(1) { animation-delay: 0s; }
.animated-text span:nth-child(2) { animation-delay: 0.1s; }
.animated-text span:nth-child(3) { animation-delay: 0.2s; }
.animated-text span:nth-child(4) { animation-delay: 0.3s; }
.animated-text span:nth-child(5) { animation-delay: 0.4s; }
.animated-text span:nth-child(6) { animation-delay: 0.5s; }
.animated-text span:nth-child(7) { animation-delay: 0.6s; }
@keyframes fade-up {
0% {
opacity: 0;
transform: translateY(20px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}