HTML CSS examples for CSS Animation:Text
Reveal Text from center with CSS Animation
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .text-div {<!-- ww w. j av a 2 s .com--> width:100%; white-space:nowrap; overflow:hidden; animation: revealText 3s; color:white; text-align:center; position: absolute; left: 0; right: 0; margin: 0 auto; top:45%; } .content { background:red; height:200px; width:200px; position:relative; } @keyframes revealText { 0% { width:0%; } 100% { width:100%; } } </style> </head> <body> <div class="content"> <div class="text-div"> ANIMATE ME </div> </div> </body> </html>