[英]How to disable scroll of iframe in ionic 3
I'm developing Hybrid E-commerce app using Ionic Framework v3
.我正在使用
Ionic Framework v3
开发混合电子商务应用程序。 I have set iframe in my app with third party url.我在我的应用程序中使用第三方 url 设置了 iframe。 Its working properly but i want to disable scrolling inside iframe .
它工作正常,但我想禁用 iframe 内的滚动。 I have tried many things like
我尝试了很多事情,比如
scrolling="no"
set inside iframescrolling="no"
iframe { overflow: hidden }
Set css iframe { overflow: hidden }
设置 css$("iframe").contents().find("#body").addClass("iframeclass")
I have also use jQuery but no luck. $("iframe").contents().find("#body").addClass("iframeclass")
我也使用过 jQuery 但没有运气。 I can disable it manually from browser when i set overflow: hidden
inside iframe > html > Body tag, but don't know how to do it with code.当我设置
overflow: hidden
在 iframe > html > Body 标记中,但不知道如何使用代码执行此操作。
Here is my code please check and suggest me proper way.这是我的代码,请检查并建议我正确的方法。
<iframe class="iframPlace" [src]="sanitizer.bypassSecurityTrustResourceUrl(browselink)" scrolling="no"></iframe>
Thank you.谢谢你。
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. 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.