Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
<!DOCTYPE html> <title>Example</title> <style> .outer-container { height: 200px; border: 1px solid black; display: flex; } .box { padding: 10px; font: 16px sans-serif; background: gold; color: white; flex-basis: 20%; } .animated { background: yellowgreen; animation: myAnimation 1s ease 1s 5 alternate forwards; } @keyframes myAnimation { 100% { flex-basis: 80%; } } </style> <div class="outer-container"> <div class="box animated">Animated Box</div> <div class="box">Box</div> </div>