<!DOCTYPE html>
<html>
<head>
<style>
#myImg {
width: 200px;
height: 400px;
object-fit: cover;
object-position: 0% 0%;
animation: mymove 5s infinite;
}
@keyframes mymove {
0% {
object-position: 0% 0%;
}
25% {
object-position: 20% 0%;
}
100% {
object-position: 100% 100%;
}
}
</style>
</head>
<body>
<h1>Animation of object-position</h1>
<p>Gradually change the position of the image inside its content box:<p>
<img src="paris.jpg" alt="Paris" id="myImg" width="400" height="300">
<p>Note: The object-position and object-fit properties are not supported in Edge 15 or earlier.</p>
</body>
</html>