1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
<!doctype html> <html> <head> <style> @keyframes move { from { transform: translate(-200px, 0); } to { transform: translate(200px, 0); } } div { height: 200px; width: 200px; animation-duration: 1.5s; animation-iteration-count: infinite; animation-name: move; background: black; } </style> </head> <body> <div></div> </body> </html>