android - Android 浏览器是否可以显示无缝 IFRAMES?

标签 android html iframe

HTML5 支持 seamless IFRAME ,这是一种现在包含 HTML 的页眉和页脚的方法。我在 Android (2.2) 浏览器上试过这个,我认为它应该是基于 HTML5 的,但它没有用。有没有办法在 Android 上执行 HTML 文件包含?

我尝试的示例由 index.html、header.html 和 footer.html 组成。在 index.html 中,它有:

<!DOCTYPE HTML>
<iframe seamless="seamless" src="header.html" sandbox="allow-top-navigation allow-scripts allow-forms allow-same-origin"></iframe>

My content goes here

<iframe seamless="seamless" src="footer.html" sandbox="allow-top-navigation allow-scripts allow-forms allow-same-origin"></iframe>

在 header.html 中,它有:

<html>
<head>
<link rel="stylesheet" href="android.css" type="text/css" />
<title>Test App</title>
</head>
<body>
<div class="home page">
    <h1>Test App</h1>
    <div class="home content">

在 footer.html 中,它有:

    </div><!-- .home .content -->
    <div class="home footer">
    </div><!-- .home .footer -->
</div><!-- .home .page -->
</body>
</html>

但是当我在运行 Android 2.2 的 Samsung Galaxy Tab 上运行代码时,我有两个不是无缝的 IFRAMES,并且页面呈现的就像在 HTML4.01 中一样。

最佳答案

Android 网络浏览器尚未完全兼容 HTML5。

http://www.techradar.com/news/phone-and-communications/mobile-phones/android-2-2-features-more-html5-fastest-mobile-browser-691051

请注意 Google 高管的话,Froyo 具有“更多 HTML5 功能”,他并没有说该网络浏览器还兼容 HTML5。

关于android - Android 浏览器是否可以显示无缝 IFRAMES?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4650612/

相关文章:

android - 如何将新词添加到 Android 用户词典,以便它们在输入时出现在候选人 View 中

android - Android 中的谷歌地图缩放错误

php - foreach 和数组的错误

javascript - 如何使用 vb.net 窗口应用程序打开没有菜单栏的 html 文件

javascript - 如何在 iframe 上实现圆 Angular

iframe - Microsoft Teams Tab 应用程序无法访问剪贴板

android - FragmentTabHost 选项卡重叠选项卡内容

android - 以编程方式为 TableRow 数组设置边框

c# - Gritter Jquery 脚本

android - 在YouTube应用程序中嵌入YouTube实时流