简体   繁体   English

防止在加载页面上滚动

[英]Prevent scrolling on load page

When loading my site http://www.confidences-lesalon.com/ , the page scroll down or I want the left scroll should not scrolling. 加载我的网站http://www.confidences-lesalon.com/时 ,页面向下滚动,或者我希望左侧滚动不滚动。 Is there any custom CSS or JavaScript code to prevent it from scrolling? 是否有任何自定义CSS或JavaScript代码来防止其滚动?

You are loading 24 JavaScripts on this page, so figuring out which is creating your situation will involve some work. 您正在此页面上加载24个JavaScript,因此弄清楚是哪种情况造成了您的麻烦。 The easiest solution is to add a 25th JavaScript that scrolls back to the top: 最简单的解决方案是添加第25个JavaScript,该JavaScript可以滚动回到顶部:

(function() {
  window.scrollTo(0,0)
})();

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

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