admin管理员组文章数量:1416051
I have used the scrolling attribute, which works for Firefox but not for chrome. I have also used overflow:hidden css, but it doesn't seem to work either.
A vertical scroll bar is not seen, but the iframe scrolls vertically on mouse-wheel, which is exactly what i want to disable.
Kindly suggest as to how I move forward!
http://www.mbe-martinique.fr/emballage-et-expedition/suivi-colis
I have used the scrolling attribute, which works for Firefox but not for chrome. I have also used overflow:hidden css, but it doesn't seem to work either.
A vertical scroll bar is not seen, but the iframe scrolls vertically on mouse-wheel, which is exactly what i want to disable.
Kindly suggest as to how I move forward!
Share Improve this question asked Dec 20, 2016 at 15:13 Shiba SalviShiba Salvi 411 silver badge2 bronze badges 1- A bination of HTML iframe - disable scroll and Disable mouse scroll wheel zoom on embedded Google Maps will probably do the trick. – Alon Adler Commented Dec 20, 2016 at 15:23
2 Answers
Reset to default 2Try to hidden the scroll bar with parent element like this example:
div {
overflow: hidden;
width: 300px;
height: 300px;
}
iframe {
border: none;
width: calc(100% + 16px);
height: calc(100% + 16px);
}
<div>
<iframe src="https://fiddle.jshell"></iframe>
</div>
Fiddle demo
Add scrolling="no" to your iframe tag:
本文标签: javascriptHow to disable scrolling for an iframe in chromeStack Overflow
版权声明:本文标题:javascript - How to disable scrolling for an iframe in chrome - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745247834a2649638.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论