简体   繁体   English

scaleX 在关键帧中自动增加

[英]scaleX increasing automatically in keyframes

In this example it is clear why the grow animation works:在这个例子中,很清楚为什么grow动画有效:

@keyframes grow {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  } 
}

However, why does it also work in the below code snippet?但是,为什么它也适用于下面的代码片段?

 div { width: 100px; height: 100px; background: red; position: relative; animation: grow 5s; } @keyframes grow { 0% { transform: scaleX(0); } }
 <body> <h1>The @keyframes Rule</h1> <div></div> </body> </html>

动画以请求的值开始,但以没有变换属性的默认值结束

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM