IE frameBorder替代 [英] IE frameBorder alternative
本文介绍了IE frameBorder替代的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
对于这一行代码:
< iframe width =600height =400frameBorder =0 src =http://stackoverflow.com>< / iframe>
发生此错误:(validator.w3.org:XHTML 1.0 Transitional)
没有属性frameBorder
我使用 frameBorder
,因为IE8会创建某种边框iframe。
是否有任何其他W3C有效的方式来删除边框表单 iframe
在IE8上?
解决方案只需使用CSS:
< iframe width =600height =400style =border:none; src =http://www.google.com>< / iframe>
p.s。我假设你在你的iFrame标签中使用stackoverflow作为例子?因为网站不允许i-Framed,它似乎...
For this line of code:
<iframe width="600" height="400" frameBorder="0" src="http://stackoverflow.com"></iframe>
I got this error: (validator.w3.org : XHTML 1.0 Transitional)
there is no attribute "frameBorder"
I'm using frameBorder
because IE8 creates some kind of border on iframes. On latest Chrome/Firefox it's fine.
Is there any other, W3C valid, way to remove border form iframe
on IE8 ?
解决方案 Simply use CSS:
<iframe width="600" height="400" style="border:none;" src="http://www.google.com"></iframe>
p.s. I assume you used stackoverflow in your iFrame tag as an example? Because the site doesn't allow being i-Framed it seems...
这篇关于IE frameBorder替代的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文