admin管理员组文章数量:1410697
In some situations a lot of sites create modal popups, and I remove these popups by deleting <div>
tags with my browser's inspector (Chrome Inspector).
In a subset of these situations, the site has also removed the scrolling feature of the page, so although I restore normal browsing function by removing the modal popup, I can't scroll the page.
How would I typically restore it
Lets use www.exitintent.io as an example after you trigger the exit intent (by moving your mouse outside of the browser)
In some situations a lot of sites create modal popups, and I remove these popups by deleting <div>
tags with my browser's inspector (Chrome Inspector).
In a subset of these situations, the site has also removed the scrolling feature of the page, so although I restore normal browsing function by removing the modal popup, I can't scroll the page.
How would I typically restore it
Lets use www.exitintent.io as an example after you trigger the exit intent (by moving your mouse outside of the browser)
Share Improve this question asked May 3, 2016 at 18:00 CQMCQM 44.3k77 gold badges230 silver badges370 bronze badges2 Answers
Reset to default 5From the inspector remove the modal-open class on the body element or just set overflow: scroll. Then either delete or set display:none on the modal elements
This one:
<div class="modal fade in" id="exitIntentModal" tabindex="-1" role="dialog" aria-labelledby="exitIntentModalLabel" aria-hidden="false" style="display: block;">
This one as well:
<div class="modal-backdrop fade in"></div>
In general, and specifically for the www.exitintent.io site that you linked, the way to "disable" scroll is to add overflow: hidden to the body and html elements of the page.
So on that site you linked, I was able to remove overflow in the inspector on both those elements (the body element has several declarations that need to be removed) and get the page scrolling again.
本文标签: cssRestore scrolling in javascript from browser inspectorStack Overflow
版权声明:本文标题:css - Restore scrolling in javascript from browser inspector - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744903068a2631459.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论