iframe in Iphone6 plus safari the width of the page is not subject to the parent page control bug

Source: Internet
Author: User

This is the desired effect:

The style setting is the width of the 100%,iframe outside the IFRAME is 90% of the parent element, the height is the width divided by 1.6, the fixed scale,

The normal display is the way it looks, but the problem appears on the specific version of the iphone-specific mobile Safari browser, which appears on it:

Such a situation. Check it out and find out why:

In the iframe inside the page is not loaded, the width and height of the iframe is normal, when the inside of the page has been loaded, the breadth will change, of course,

The height also changes accordingly. The iframe width and height shown in the parent page are actually the true height of the sub-page! That is, the width of the sub-page does not receive CSS and JS

(JS has a value to change the width).

Later Google a bit, found a solution, special to write down:

1:<iframe src= "" frameborder= "0" id= "pptframe" scrolling= "no" ></IFRAME>

In the IFrame tab, plus scrolling force no scroll bar

2: Use width:1px!important, with the highest permissions to change the width of the IFRAME (if not, the width of the sub-page element will open the IFRAME);

If you need to change the width of the IFRAME again, you can choose Min-width, or use Width:xxpx!important

iframe in Iphone6 plus safari the width of the page is not subject to the parent page control bug

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.