<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>Animated rolling word title</title>
<link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Raleway:400,700,800'>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="background"></div>
<span class="text">
We specialise in
<span class="word one"> Applications</span>
<span class="word two"> Building</span>
<span class="word three"> Coding</span>
<span class="word four"> Digital</span>
<span class="word five"> Educating</span>
<span class="word six final"> Fun</span>
</span>
</body>
</html>
/*Downloaded from https://www.codeseek.co/chrishutchinson/animated-rolling-word-title-hzlsL */
*, *:before, *:after {
box-sizing: border-box;
}
body {
background: #FFF;
color: #FFF;
font-family: 'Raleway', sans-serif;
font-weight: 800;
font-size: 14px;
margin: 0;
padding: 0px;
}
div.background {
position: absolute;
background: url(http://lorempixel.com/1200/1000/city);
background-size: cover;
width: 100%;
height: 100%;
}
.text {
position: relative;
display: block;
width: 100%;
font-size: 3em;
background: #333;
padding: 80px 20px;
overflow: hidden;
box-shadow: 0 0 0 10px #DDD;
}
.word {
counter-increment: word;
width: 250px;
padding: 80px 0;
top: 100px;
position: absolute;
-webkit-animation: slide-up-fade 3s linear forwards;
animation: slide-up-fade 3s linear forwards;
opacity: 0;
}
.word.final {
-webkit-animation: slide-up-persist 3s linear forwards;
animation: slide-up-persist 3s linear forwards;
}
.word.one {
-webkit-animation-delay: 0s;
animation-delay: 0s;
}
.word.two {
-webkit-animation-delay: 3s;
animation-delay: 3s;
}
.word.three {
-webkit-animation-delay: 6s;
animation-delay: 6s;
}
.word.four {
-webkit-animation-delay: 9s;
animation-delay: 9s;
}
.word.five {
-webkit-animation-delay: 12s;
animation-delay: 12s;
}
.word.six {
-webkit-animation-delay: 15s;
animation-delay: 15s;
}
@-webkit-keyframes slide-up-fade {
25% {
top: 0px;
}
55% {
top: 0px;
opacity: 1;
}
85% {
top: 0px;
opacity: 1;
}
99% {
opacity: 0;
top: 0px;
}
100% {
opacity: 0;
top: 100px;
}
}
@keyframes slide-up-fade {
25% {
top: 0px;
}
55% {
top: 0px;
opacity: 1;
}
85% {
top: 0px;
opacity: 1;
}
99% {
opacity: 0;
top: 0px;
}
100% {
opacity: 0;
top: 100px;
}
}
@-webkit-keyframes slide-up-persist {
25% {
top: 0px;
}
55% {
top: 0px;
opacity: 1;
}
85% {
top: 0px;
opacity: 1;
}
99% {
opacity: 1;
top: 0px;
}
100% {
opacity: 1;
top: 0px;
}
}
@keyframes slide-up-persist {
25% {
top: 0px;
}
55% {
top: 0px;
opacity: 1;
}
85% {
top: 0px;
opacity: 1;
}
99% {
opacity: 1;
top: 0px;
}
100% {
opacity: 1;
top: 0px;
}
}