微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

css – HTML5和frameborder

我有一个HTML5文档的iframe。当我验证,我得到一个错误告诉我,iframe frameBorder的属性是过时的,并使用CSS代替。

我有这个属性frameBorder =“0”在这里,因为它是唯一的方法,我可以找出如何摆脱IE中的边框,我尝试border:none;在CSS中没有运气。有一个兼容的方法解决这个问题吗?

谢谢。

解决方法

HTML 5 doesn’t support attributes such
as frameborder,scrolling,
marginwidth,and marginheight (which
were supported in HTML 4.01). Instead,
the HTML 5 specification has
introduced the seamless attribute. The
seamless attribute allows the inline
frame to appear as though it is being
rendered as part of the containing
document. For example,borders and
scrollbars will not appear.

Source

有关html5 iframe和无缝的更多信息,你可以找到here

Internet Explorer 8不支持html5的所有功能,所以你会有问题使用iframe,htm5,ie在一起。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。