<link href="index.processed.css" rel="stylesheet">
<div class="box" >
<div class="my-title" >
<div class="copies" style="display: none" >
<span>Cool 3D Animated CSS3 Title</span>
<span>Cool 3D Animated CSS3 Title</span>
<span>Cool 3D Animated CSS3 Title</span>
<span>Cool 3D Animated CSS3 Title</span>
<span>Cool 3D Animated CSS3 Title</span>
<span>Cool 3D Animated CSS3 Title</span>
<span>Cool 3D Animated CSS3 Title</span>
</div>
<!--Repeat the title on several lines-->
</div>
</div>
@keyframes animate{
0%{
top: 0px;
left: 0;
}
50%{
top: 0;
left: 0;
}
60%{
left: calc( var( --var-index ) * -1px );
top: calc( var( --var-index ) * -1px );
}
70%{
left: calc( var( --var-index ) * 1px );
top: calc( var( --var-index ) * -1px );
}
80%{
left: calc( var( --var-index ) * 1px );
top: calc( var( --var-index ) * 1px );
}
90%{
left: calc( var( --var-index ) * -1px );
top: calc( var( --var-index ) * 1px );
}
100%{
top: 0;
left:0;
}
}
div, h1, html, span, body{
margin: 0 auto;
padding: 0;
box-sizing: border-box;
}
.box{
height: 100vh;
background-color: #222;
align-items: center;
display: flex;
font-family: 'Yanone Kaffeesatz', sans-serif;
.copies{
display: block !important;
height: 0;
span{
display: block;
height: 0;
position: relative;
left: 0;
bottom: 0;
animation: animate 8s infinite;
color: hsl(0, 0%, calc(( var(--var-index) * 10%)));
@for $i from 1 through 7 {
&:nth-child(#{$i}) {
--var-index: #{$i};
}
}
}
}
h1, .copies span{
font-family: 'Anton', sans-serif;
font-size: 40px;
line-height: 40px;
letter-spacing: 5px;
text-transform: uppercase;
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.