简体   繁体   English

当我将overflow-y:hidden设置为元素时,导致滚动显示动画不触发

[英]When I set overflow-y:hidden to element causes scroll reveal animation to not fire

I am using scrollreveal.min.js on my WordPress site. 我在我的WordPress网站上使用scrollreveal.min.js。

Scroll reveal works just fine, but when I attempted to hide the vertical scroll bar that appears during animation (for the section) with 滚动显示效果很好,但是当我尝试隐藏动画(该部分)期间出现的垂直滚动条时,

overflow-y:hidden; 

the scroll bar was hidden for the element, but animation on scroll no longer worked for each item. 滚动条已为该元素隐藏,但滚动动画不再适用于每个项目。

Also, one other question, in order for overflow-y:hidden; 另外,还有一个问题,是为了溢出-y:hidden; to work I have to comment out my overflow:auto; 要工作,我必须注释掉我的溢出: is this necessary or is there a way those can work together? 这是必要的还是有一种可以一起工作的方式?

Overflow-y:hidden as per w3 schools "The content is clipped - and no scrolling mechanism is provided". y-溢出:按照w3的学校隐藏:“内容被剪切-不提供滚动机制”。 This means that the content is cut off, as in, you can't scroll anymore. 这意味着内容被切断,因为您不能再滚动。 Kind of like an image when it's cropped, you can't scroll in a cropped image. 有点像裁剪后的图像,无法滚动到裁剪后的图像。 You'll want something like this instead: Hide scroll bar, but still being able to scroll 您将需要这样的东西: 隐藏滚动条,但仍然可以滚动

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

相关问题 隐藏溢出y时如何找到隐藏的第一个元素? - How to find the first element hidden when overflow-y is hidden? 我如何使用溢出Y滚动到div中的元素 - How do I scroll to an element within a div with overflow-y 设置溢出-y:隐藏; 导致页面在 Firefox 中跳转到顶部 - Setting overflow-y: hidden; causes the page to jump to the top in Firefox 正文溢出-y:隐藏,同时保留滚动 position - body overflow-y:hidden while preserving scroll position 如果鼠标下的元素只有“溢出-y:滚动”并水平滚动,iOS Safari 似乎永远不会触发滚动事件 - iOS Safari appears to never fire scroll event if the element under mouse has only "overflow-y: scroll" and scrolling horizontally 当用户手指超出overflow-y时,如何结束滚动:滚动元素? - How to end scroll when user finger gets outside of overflow-y:scroll element? 在内部使用javascript代码时无法解释的浏览器滚动条 <div> 设置为overflow-y:scroll; - Unexplained browser scroll bar when using javascript code inside <div> set to overflow-y:scroll; 溢出-y:scroll和height:100vh时如何滚动底部 - How can I scroll bottom when overflow-y:scroll and height:100vh 使用带有overflow-y的固定元素内的scrollTop:scroll - Using scrollTop inside of a fixed element with overflow-y:scroll 使用overflow-y时,拖动项将被隐藏 - Dragging item gets hidden when overflow-y is used
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM