Web.QHMIT
.com
Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
Run
<!DOCTYPE html> <title>Example</title> <style> .animatedBox { width: 300px; height: 225px; text-align: center; font: 24px sans-serif; color: white; text-shadow: 0px 0px 12px black; background-image: url('/pix/samples/16m.jpg'); background-position: center; background-repeat: no-repeat; background-size: 0%; animation: myAnimation 2s ease 1s 1 forwards; } @keyframes myAnimation { 100% { background-size: 100%; } } </style> <div class="animatedBox">Animated box</div>
Preview