早上好。
我刚刚从 friend 那里得到了一个免费模板,除了所有 .html 文件外,一切都运行良好。每个 html 文件至少有一个问题,就像 eclipse 无法识别 HTML5 验证一样。
看一个例子:
<!DOCTYPE html>
<head>....</head>
<iframe src="http://player.vimeo.com/video/27973852?title=0&byline=0&portrait=0&api=1&player_id=iframe334" height="240" allowfullscreen="true"></iframe>
错误:未定义的属性名称(允许全屏)。
此外,当我尝试访问我的 .html 页面之一时,我从 Tomcat 收到此错误:
警告:JSF1091:找不到文件/about-me.jsp 的 MIME 类型。 P要解决此问题,请将 mime 类型映射添加到应用程序 web.xml。 2014 年 4 月 26 日下午 12:29:24 com.sun.faces.application.resource.ResourceHandlerImpl logMissingResource
Ps:所有的 css3 文件都工作正常。
最佳答案
那么 validator 不是最新的。
https://html.spec.whatwg.org/multipage/embedded-content.html#attr-iframe-allowfullscreen
但是它应该只是allowfullscreen
, 不是 allowfullscreen="true"
.
https://validator.nu/支持allowfullscreen
属性。
没有属性,原生全屏 requestFullscreen()
不管用。全屏从 Flash 左右可能仍然有效。我不知道 vimeo 做了什么,但可能它使用 <video>
+ requestFullscreen()
对于某些用户或将来会这样做。
https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
关于java - HTML5 - 验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23313060/