CSS
语言:
CSSSCSS
确定
@import url(http://fonts.googleapis.com/css?family=Raleway:400);
body {
background: #222;
height: 100vh;
width: 100vw;
overflow: hidden;
}
.wrd {
position: absolute;
text-align: center;
font-size: 120px;
margin-top: 120px;
height: 20px;
max-width: content-box;
overflow: hidden;
font-weight: bold;
padding: 0;
right: 0;
left: 0;
color: black;
line-height: 90px;
font-family: 'Raleway', sans-serif;
}
.wrd:nth-child(1) {
opacity: 0;
height: 10px;
z-index: -1;
color: #33b2cc;
-webkit-animation: fade 1s 0.2s linear alternate infinite;
animation: fade 1s 0.2s linear alternate infinite;
}
.wrd:nth-child(2) {
opacity: 0;
height: 20px;
z-index: -2;
color: #33c;
-webkit-animation: fade 1s 0.4s linear alternate infinite;
animation: fade 1s 0.4s linear alternate infinite;
}
.wrd:nth-child(3) {
opacity: 0;
height: 30px;
z-index: -3;
color: #b233cc;
-webkit-animation: fade 1s 0.6s linear alternate infinite;
animation: fade 1s 0.6s linear alternate infinite;
}
.wrd:nth-child(4) {
opacity: 0;
height: 40px;
z-index: -4;
color: #c36;
-webkit-animation: fade 1s 0.8s linear alternate infinite;
animation: fade 1s 0.8s linear alternate infinite;
}
.wrd:nth-child(5) {
opacity: 0;
height: 50px;
z-index: -5;
color: #cc8033;
-webkit-animation: fade 1s 1s linear alternate infinite;
animation: fade 1s 1s linear alternate infinite;
}
.wrd:nth-child(6) {
opacity: 0;
height: 60px;
z-index: -6;
color: #9c3;
-webkit-animation: fade 1s 1.2s linear alternate infinite;
animation: fade 1s 1.2s linear alternate infinite;
}
.wrd:nth-child(7) {
opacity: 0;
height: 70px;
z-index: -7;
color: #33cc4d;
-webkit-animation: fade 1s 1.4s linear alternate infinite;
animation: fade 1s 1.4s linear alternate infinite;
}
.wrd:nth-child(8) {
opacity: 0;
height: 80px;
z-index: -8;
color: #3cc;
-webkit-animation: fade 1s 1.6s linear alternate infinite;
animation: fade 1s 1.6s linear alternate infinite;
}
.wrd:nth-child(9) {
opacity: 0;
height: 90px;
z-index: -9;
color: #334dcc;
-webkit-animation: fade 1s 1.8s linear alternate infinite;
animation: fade 1s 1.8s linear alternate infinite;
}
@-webkit-keyframes fade {
100% {
opacity: 1;
}
}
@keyframes fade {
100% {
opacity: 1;
}
}