[英]How to disable scroll of iframe in ionic 3
我正在使用Ionic Framework v3
开发混合电子商务应用程序。 我在我的应用程序中使用第三方 url 设置了 iframe。 它工作正常,但我想禁用 iframe 内的滚动。 我尝试了很多事情,比如
scrolling="no"
iframe { overflow: hidden }
设置 css$("iframe").contents().find("#body").addClass("iframeclass")
我也使用过 jQuery 但没有运气。 当我设置overflow: hidden
在 iframe > html > Body 标记中,但不知道如何使用代码执行此操作。
这是我的代码,请检查并建议我正确的方法。
<iframe class="iframPlace" [src]="sanitizer.bypassSecurityTrustResourceUrl(browselink)" scrolling="no"></iframe>
谢谢你。
if set width and height for iframe, bigger than source, scroll is hidden otherwise iframe have a scroll because an HTML iframe is used to display a full web page within in web page and it's impossible to disable scroll.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.