移动浏览器上的整页iframe [英] Full page iframe on mobile browsers

查看:65
本文介绍了移动浏览器上的整页iframe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将一个页面完全嵌入另一个页面的iframe中.直接浏览源页面时,其嵌入页面应该看起来完全一样.

I'm trying to fully embed a page inside an iframe in another page. The page where it's embedded is supposed to look exactly like when browsing the source page directly.

我尝试了很多不同的框架/iframe和样式组合,这些组合都是从stackoverflow或来自各种博客的,它们都在台式机上运行,​​但在移动设备上看起来都不同.

I've tried many different frame/iframe and style combinations that I've found, all either here from stackoverflow or from various blogs, they all work on desktop but all look different on mobile.

在android上两个站点之间的比较:

Comparison between the two sites on android:

在台式机浏览器上看起来相同,但是在移动设备上,iframe内的页面总是看起来较小,并且无法填满整个屏幕.

It looks the same on desktop browsers, but on mobile the page inside the iframe always looks smaller and doesn't fill the whole screen.

据我所知,问题来自src页面上的css,但我无法对其进行编辑.是否可以在不更改嵌入式网站本身的情况下在移动浏览器上使用此功能?

From what I unterstand the problem comes from the css on the src page, but I can't edit that. Is it possible to get this working on mobile browsers without making changes to the embedded site itself?

更新:

我要嵌入的网站是这样的: office074.wix.com/vitalpharma

The site I want to embed is something like this: office074.wix.com/vitalpharma

我已经尝试过的东西:

  • www.dev-explorer.com/articles/full-page-iframe
  • cloud.mobify.com/docs/working-with-iframes/
  • www.smashingmagazine.com/2014/02/27/making-embedded-content-work-in-sensitive-design/
  • stackoverflow.com/questions/17838607/making-an-iframe-sensitive
  • stackoverflow.com/questions/26194040/how-does-this-response-iframe-container-snippet-work/26194041#26194041
  • stackoverflow.com/questions/7902960/creating-a-full-screen-iframe
  • stackoverflow.com/questions/325273/make-iframe-to-fit-100-containers-remaining-height

(抱歉,最多只能发布2个直接链接)

(Can't post more then 2 direct links, sorry)

推荐答案

对于对此进行搜索的任何人,只需在html中包括原始的meta标签(来自iframe网站)即可.这样可以缩放页面以匹配iframe中的内容.

For anyone searching on this, just include the original meta tags (from the iframe site) in your html. This will scale your page to match the content inside your iframe.

这篇关于移动浏览器上的整页iframe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆