为什么我的关键帧动画不起作用? -HTML CSS

时间:2019-07-13 00:02:17

标签: html css animation

我试图使一个正方形变大然后变小。不知道为什么动画不起作用。

#filter {
  background-color: red;
  height: 50px;
  width: 50px;
  animation: thing 2s infinite;
  position: absolute;
}
@keyframes thing {
  0% {
    transform: scale(1.0);
  };
  100% {
    transform: scale(2.0);
  };
}
<DOCTYPE html>
  <html>
    <body>
      <div id="filter"></div>
    </body>
  </html>

0 个答案:

没有答案