<p class="typing">
This is the first line of the text effect that reveals itself slowly .
</p>
<p class="typing">
This is the second line of the text effect that reveals itself slowly .
</p>
<p class="typing">
This is the third line of the text effect that reveals itself slowly .
</p>
<p class="typing">
This is the fourth line of the text effect that reveals itself slowly .
</p>
html {
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
html,
body {
margin: 0;
padding:0;
}
body {
background: #000;
color: #fff;
font-family: monospace;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
}
.typing {
font-size: 1rem;
padding:5px 1rem 5px;
background-color: black;
color: #fff;
position: relative;
overflow: hidden;
display: table;
white-space:nowrap;
margin: 0 0 .5rem;
}
.typing:after {
content: "";
position: absolute;
left: -10%;
top: 0;
right:-10%;
bottom: 0;
background: linear-gradient(
to right,
rgba(0, 0, 0, 0) 0%,
rgba(0, 0, 0, 1) 10%,
rgba(0, 0, 0, 1) 100%
);
animation: reveal 3s linear forwards;
}
@keyframes reveal {
100% {
transform: translateX(100%);
}
}
.typing:nth-child(2):after,
.typing:nth-child(2):before {
animation-delay: 3s;
}
.typing:nth-child(3):after,
.typing:nth-child(3):before {
animation-delay: 6s;
}
.typing:nth-child(4):after,
.typing:nth-child(4):before {
animation-delay: 9s;
}
.typing:nth-child(5):after,
.typing:nth-child(5):before {
animation-delay: 12s;
}
.typing:before{
content:"";
position: absolute;
top: 50%;
left: -150px;
width: 80px;
height: 0;
z-index:0;
border-radius: 50%;
box-shadow:0 0 20px 10px rgba(255,255,255,0.5);
animation: glow 3s linear forwards;
}
@keyframes glow {
100% {
left: calc(100% + 100px);
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.