search

Home  >  Q&A  >  body text

javascript - An iframe is nested in a web page. The web page and the iframe viewport are different. How can I prevent the web page in the iframe from deforming?

Web page:

<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">`

iframe:

  <meta name="viewport" content="width=750,maximum-scale=1.3,user-scalable=no,minimal-ui">

Now the content in the iframe is deformed. If the size of the html and iframe content is not changed, how can the iframe content not be deformed?

迷茫迷茫2696 days ago1292

reply all(2)I'll reply

  • 黄舟

    黄舟2017-07-03 11:44:58

    Set the iframe’s padding to 0 and so on

    reply
    0
  • typecho

    typecho2017-07-03 11:44:58

    First of all, is the page linked to your iframe responsive? If so, is the size of the iframe consistent with the original page size?

    reply
    0
  • Cancelreply