【发布时间】:2020-03-31 05:04:49
【问题描述】:
我有一个元素应该在屏幕前冲向用户,但也像从上面掉下来一样。
我尝试从rotateX(-90deg) 转换到rotateX(0) 以及从rotateX(360deg) 转换到rotateX(270deg),但它看起来不像我想要的那样。
我也不知道在 Google 上搜索这个是什么好方法。
素描
源代码
body {
margin: 0 0;
}
.my-class-here {
width: 100%;
height: 100vh;
animation-name: header-anim;
animation-duration: 5s;
width: 200px;
height: 200px;
background-color: yellow;
text-align: center;
}
@keyframes header-anim {
0% {
transform: rotateX(360deg);
}
100% {
transform: rotateX(270deg);
}
}
<div class="my-class-here">
TEST
</div>
我怎样才能做到这一点?
谢谢!
【问题讨论】:
标签: css rotation css-animations css-transforms