"iframe元素上的frameborder属性已过时.请改用CSS." [英] "The frameborder attribute on the iframe element is obsolete. Use CSS instead."

查看:758
本文介绍了"iframe元素上的frameborder属性已过时.请改用CSS."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用W3C验证器来验证我的网站,但是它不起作用.我有一个YouTube iframe,这是错误消息:

I'm trying to validate my website with the W3C validator but it doesn't work. I have a YouTube iframe and this is the error:

iframe元素上的frameborder属性已过时.改用CSS.

The frameborder attribute on the iframe element is obsolete. Use CSS instead.

屏幕截图:

这是我的index.html(已裁剪):

And this is my index.html (cropped):

<!-- 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."

As they state themselves "The frameborder attribute is not supported in HTML5. Use CSS instead."

css中frameborder的等效值为border: 0px;.将其添加到CSS中的iframe中.

The equivalent of frameborder in css is border: 0px;. Add it to your iframe in css.

这篇关于"iframe元素上的frameborder属性已过时.请改用CSS."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆