|
選單
×
×
正確!
練習指定 <div> 元素的動畫在向前和向後執行之間交替。 <style> div { width: 100px; height: 100px; position: relative; background-color: red; animation-name: example; animation-duration: 4s; animation-iteration-count: infinite; @(19): @(9); } @keyframes example { 0% {background-color: red; left:0px; top:0px;} 25% {background-color: blue; left:0px; top:200px;} 50% {background-color: green; left:200px; top:200px;} 75% {background-color: yellow; left:200px; top:0px;} 100% {background-color: red; left:0px; top:0px;} } </style> <body> <div>這是一個 div</div> </body>
<style> div { width: 100px; height: 100px; position: relative; background-color: red; animation-name: example; animation-duration: 4s; animation-iteration-count: infinite; animation-direction: alternate; } @keyframes example { 0% {background-color: red; left:0px; top:0px;} 25% {background-color: blue; left:0px; top:200px;} 50% {background-color: green; left:200px; top:200px;} 75% {background-color: yellow; left:200px; top:0px;} 100% {background-color: red; left:0px; top:0px;} } </style> <body> <div>這是一個 div</div> </body>
不正確點選這裡 重新嘗試。 正確!下一個 ❯ |
這將重置所有 138 個練習的分數。
您確定要繼續嗎?