【问题标题】:iFrame with Mobile mode带有移动模式的 iFrame
【发布时间】:2018-12-23 01:27:22
【问题描述】:

我的网站http://asmgx.com 是为更长的链接创建一个短网址

网站本身会自动调整为移动或桌面模式 我可以在移动模式下完美查看网站(尺寸)

但是当我查看上面的链接时说http://asmgx.com/rjk 它以桌面模式显示。

我的意思是当我将 iFrame 分配给链接时,该链接仍处于桌面模式

我应该怎么做才能让 iFrame 根据它查看的设备显示 src 链接。

我的代码是

.aspx 文件

<iframe id="frmURL" runat="server" frameborder="0" height="100%" width="100%"></iframe>

.aspx.cs 文件

                    this.frmURL.Attributes.Add("src", sURL);
                    this.frmURL.Attributes.Add("style", "overflow: hidden; overflow-x: hidden; overflow-y: hidden; height: 100%; width: 100%; position: absolute; top: " + iFrameTop.ToString() + "px; left: 0px; right: 0px; bottom: 0px");

【问题讨论】:

    标签: html asp.net iframe mobile desktop


    【解决方案1】:

    我会使用&lt;meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"&gt; 来打造一个响应速度更快的网站, 而不是 iFrame

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-04-02
      • 2017-10-12
      • 2023-03-21
      • 1970-01-01
      • 2012-09-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多