HTML CSS examples for CSS:Quiz
Set animation to have a "ease-in-out" speed curve.
<!DOCTYPE html> <html> <head> <style> div {<!-- w ww . j a va 2s . c om--> width: 100px; height: 100px; position: relative; background-color: red; animation-name: example; animation-duration: 4s; animation-timing-function: ease-in-out; } @keyframes example { 0% {background-color: red; left:0px;} 50% {background-color: yellow; left:200px;} 100% {background-color: red; left:0px;} } </style> </head> <body> <div></div> </body> </html>