我正在建立一个网站,我需要一些动画。我的问题是我有一个带有以下 CSS 的块:
.description {
position: relative;
top: 100%;
transform: translateY(-100%);
}
块如下:
<section id="first-section">
<div class="description wow fadeInUp">
<!-- Some other content here -->
</div>
</section>
<section id="second-section">...</section>
但是当我向下滚动.description
块执行动画#second-section
然后移动(没有动画)到里面的正确位置#first-section
时,我是否清楚?
.description
由于设计原因,需要以这种方式定位,但我需要平滑动画。知道为什么哇我的街区有这个问题吗?
提前感谢您的回答。