<html>
<head>
<style>
#myDIV {
width: 120px;
background-color: coral;
color: white;
animation: mymove 5s infinite;
}
@keyframes mymove {
50% {width: 500px;}
}
</style>
</head>
<body>
<h1>Animation of width</h1>
<p>Gradually change the width of the DIV element from 120px to 500px, and back to 120px:<p>
<div id="myDIV">
<h1>My DIV</h1>
</div>
<p><strong>Note:</strong> CSS Animations do not work in Internet Explorer 9 and earlier versions.</p>
</body>
<!-- Mirrored from www.w3schools.com/cssref/tryit.asp?filename=trycss_anim_width by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:36:21 GMT -->
</html>