菜单
×
×
正确!
练习指定 <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 个练习的分数。
您确定要继续吗?