对于这行代码:
<iframe width="600" height="400" frameBorder="0" src="http://stackoverflow.com"></iframe>
我收到此错误:(validator.w3.org : XHTML 1.0 Transitional)
there is no attribute "frameBorder"
我正在使用 frameBorder
因为 IE8 在 iframe 上创建了某种边框。在最新的 Chrome/Firefox 上没问题。
是否有任何其他 W3C 有效的方法来删除 IE8 上的 iframe
边框形式?
最佳答案
只需使用 CSS:
<iframe width="600" height="400" style="border:none;" src="http://www.google.com"></iframe>
附注我假设您在 iFrame 标记中使用了 stackoverflow 作为示例?因为该站点不允许使用 i-Framed 似乎...
关于html - IE frameBorder替代方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9985658/