CSS Text Sliding Animation code example
Example 1: text sliding css
.slide-right {
width: 100%;
overflow: hidden;
margin-left: 400px;
max-width: 500px
}
.slide-right h2 {
animation: 2s slide-right;
animation-delay: 2s;
}
@keyframes slide-right {
from {
margin-left: -500px;
}
to {
margin-left: 0%;
}
}
Example 2: sliding text css
<div class="slide-">
<h2>Text that will slide in from the left</h2>
</div>