Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html IE框架边界替代方案_Html_Css_Iframe_Internet Explorer 8_W3c Validation - Fatal编程技术网

Html IE框架边界替代方案

Html IE框架边界替代方案,html,css,iframe,internet-explorer-8,w3c-validation,Html,Css,Iframe,Internet Explorer 8,W3c Validation,对于这一行代码: <iframe width="600" height="400" frameBorder="0" src="http://stackoverflow.com"></iframe>​ 我使用的是frameBorder,因为IE8在iFrame上创建了某种边界。在最新的Chrome/Firefox上,一切正常 是否有其他W3C有效的方法来删除IE8上的边框形式iframe。xhtml中的所有属性都是小写的。尝试以下方法: <iframe width=

对于这一行代码:

<iframe width="600" height="400" frameBorder="0" src="http://stackoverflow.com"></iframe>​
我使用的是
frameBorder
,因为IE8在iFrame上创建了某种边界。在最新的Chrome/Firefox上,一切正常


是否有其他W3C有效的方法来删除IE8上的边框形式
iframe
xhtml中的所有属性都是小写的。尝试以下方法:

<iframe width="600" height="400" frameborder="0" src="http://stackoverflow.com"></iframe>​

由于W3C没有执行Javascript,因此您可以稍后使用Javascript添加该属性

使用jQuery的示例:

$('iframe').attr("frameBorder", 0);
只需使用CSS:

<iframe width="600" height="400" style="border:none;" src="http://www.google.com"></iframe>


p、 我假设您在iFrame标记中使用了stackoverflow作为示例?由于该站点不允许使用i-Framed,因此验证程序似乎也不允许使用可能重复的
frameborder
。对测试进行黑客攻击不会使其有效。
<iframe width="600" height="400" style="border:none;" src="http://www.google.com"></iframe>