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>