简体   繁体   English

如何防止底部滚动条出现?

[英]How can I prevent bottom scroll bar from appearing?

On this dev URL I use skrollr to make desk items slide away . 在这个dev URL上,我使用skrollr使桌面项目滑开 the action takes place between scroll position 0 and 300. Anywhere in between there, the bottom scroll bar appears bc items are moving off the right side of the page. 操作将在滚动位置0和300之间进行。在滚动位置0和300之间的任何位置,底部滚动条都会出现,而bc项正从页面右侧移出。 At 300, all items that moved off to the right of the page get "display: none" assigned, so they disappear and the scroll bar goes away. 在300,所有移至页面右侧的项目均被分配“显示:无”,因此它们消失并且滚动条消失。

Is there anyway to prevent the scroll bar from EVER appearing? 是否有防止滚动条永远出现的方法?

Since it is on the x-axis, you can use overflow:hidden : 由于它在x轴上,因此可以使用overflow:hidden

body{
  overflow-x:hidden !important;
  }

This will ensure no scrolling on the body's x-axis. 这将确保在人体的x轴上不会滚动。

kurt you are correct but this will only hide the overflow at the bottom of your page the you have content here: kurt,您是正确的,但这只会将溢出内容隐藏在页面底部,您可以在此处找到内容:

<section class="t3-copyright">
        <div class="container">

This div spans more than the width of the page set the container div max-width:100%; 该div的宽度大于设置容器div的页面宽度max-width:100%; and the scroll bar will go away. 滚动条将消失。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM