我正在尝试使用W3C验证器来验证我的网站,但是它不起作用。我有一个YouTube iframe,这是错误消息:
The frameborder attribute on the iframe element is obsolete. Use CSS instead.
屏幕截图:
这是我的index.html(已裁剪):
<!-- Video -->
<div class="video-container box-size">
<iframe width="700" height="312" src="http://www.youtube.com/embed/OfUPsnAtZMI" frameborder="0" allowfullscreen></iframe>
</div>
我该如何纠正?
最佳答案
他们指出:“HTML5不支持frameborder属性。请改用CSS。”
CSS中的frameborder等效于border: 0px;
。将其添加到CSS中的iframe中。
关于html - “The frameborder attribute on the iframe element is obsolete. Use CSS instead.”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26274082/