父母以怪癖模式呈现时,是否可以在标准模式下呈现iframe内容? [英] Can an iframe content be rendered in standards mode when the parent is rendered in Quirks mode?

查看:95
本文介绍了父母以怪癖模式呈现时,是否可以在标准模式下呈现iframe内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个html页面,它在iframe中呈现一个html页面,其中我的页面将topbar添加到整个内容中。为了渲染整个页面,我不得不依赖于页面的quirksmode渲染来显示以下内容:(类似于google图片结果页面的方式(页面u点击具有顶部框架的图片) -

 < table> 
< tbody>
< tr>
< td>
<! - 顶栏内容 - >
< / td>
< / tr>
< tr>
< td> $ $ b< / tr>
< / tbody>

这里的问题是有些页面无法正确渲染模式,所以它们在iframe中不能正确显示,我怎么能克服这个问题?我可以在标准模式下渲染iframe,而整个页面以怪癖模式渲染(我不能妥协)。
$ b

是否有替代品? tive solution?

解决方案

延迟回答...但如果您使用对象标记而不是iframe标记,改变渲染模式。

 < html> 
< head>
< title>怪癖模式+ iframe测试< /标题>
< / head>
< body>
< object type =text / htmldata =http://stevesspace.com/test/quirks/modern.htmlstyle =width:300px; height:500px;>< /对象>
< / body>
< / html>

不幸的是,在IE10中,如果外部页面在IE8模式下使用

 < META http-equiv = X-UA-compatible content = IE = 8> 

我还在寻找解决方案...

另见当页面处于怪异模式时,iframe不会以ie9模式呈现


I have an html page which renders an html page in an iframe where my page adds a topbar to the whole content. Inorder to render the whole page seemless, I had to rely on quirksmode rendering of the page to display the following:(similar to the way google image results page(page u get on click of an image with a top frame)-

<table>
    <tbody>
        <tr>
            <td>
               <!-- Top bar content -->
           </td>
       </tr>
       <tr>
            <td>
                <iframe src="http://anysite.com/"/>
            </td>
       </tr>
    </tbody>
</table>

The problem here is that there are pages which donot render properly in quirks mode. So they do not come out properly in the iframe. How will I overcome this? Can I render just the iframe in standards mode while the whole page is rendered in quirks mode(which I cannot compromise) .

Is there an alternative solution?

解决方案

Delayed answer... but if you use an object tag instead of an iframe tag, in IE it will change the rendering mode.

<html>
<head>
    <title>Quirks mode + iframe test</title>
</head>
<body>
    <object type="text/html" data="http://stevesspace.com/test/quirks/modern.html" style="width: 300px; height: 500px;"></object>
</body>
</html>

Unfortunately, in IE10 this doesn't work if the outer page renders in IE8 mode using

<META http-equiv=X-UA-Compatible content=IE=8>

Which I'm still searching for a solution to...

See also iframe not rendering in ie9 mode when containing page is in quirks mode

这篇关于父母以怪癖模式呈现时,是否可以在标准模式下呈现iframe内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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