简体   繁体   中英

How to disable scroll of iframe in ionic 3

I'm developing Hybrid E-commerce app using Ionic Framework v3 . I have set iframe in my app with third party url. Its working properly but i want to disable scrolling inside iframe . I have tried many things like

  1. scrolling="no" set inside iframe
  2. iframe { overflow: hidden } Set css
  3. $("iframe").contents().find("#body").addClass("iframeclass") I have also use jQuery but no luck.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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