【问题标题】:Animations on scroll causing there to be white space on mobile devices滚动动画导致移动设备上出现空白
【发布时间】:2022-10-18 23:48:57
【问题描述】:

我在我的 HTML 代码中添加了一个动画库,但由于某种原因,它会导致移动设备屏幕右侧出现空白。在台式机/笔记本电脑上没有空白,但我不确定为什么它在移动设备上显示空白。

<head>
 <link rel="stylesheet" 
 href="https://unpkg.com/aos@next/dist/aos.css" 
 />
</head>

<body>
<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
  AOS.init();
</script>

<div data-aos="fade-left">
 <p>lorem ipsum dolor</p>
</div>
</body>

【问题讨论】:

    标签: html animation


    【解决方案1】:

    使数据-aos-once=true 它会让它出现一次,但它会让正确的空间消失,它总是在那里,因为它总是活跃的

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-27
      • 1970-01-01
      • 2012-01-22
      • 1970-01-01
      • 1970-01-01
      • 2019-10-27
      相关资源
      最近更新 更多