【发布时间】:2019-07-01 11:44:35
【问题描述】:
我想为页面顶部的元素设置动画。事情是这样的:
HTML:
...
<ion-row id="theHistory"></ion-row>
...
CSS:
@keyframes floatBubble {
0% {
top:??;
}
100% {
top: 0px;
}
}
.element-up{
z-index:10;
background-color:white;
-webkit-animation: floatBubble 2s infinite normal ease-out;
animation: floatBubble 2s infinite normal ease-out;
position: absolute;
}
JS:
scrollToHistory.classList.add('element-up')
我应该在顶部放置什么值才能占据 ion-row 的当前位置?或者我必须以其他方式做到这一点?
【问题讨论】:
标签: css css-animations keyframe