HTML <video> 标签
实例
带有预览图的视频播放器:
<video controls poster="/images/w3html5.gif">
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
您的浏览器不支持 video 标签。
</video>
浏览器支持





所有主流浏览器都支持 poster 属性。
注意: Internet Explorer 8 及更早IE版本不支持 <video> 标签。
定义和用法
poster 属性指定视频下载时显示的图像,或者在用户点击播放按钮前显示的图像。
HTML 4.01 与 HTML5之间的差异
<video> 标签是HTML5新标签。
语法
属性值
值 |
描述 |
URL |
指定图片文件的URL。 可能值:
- 绝对URL - 指向另外一个站点URL (如:href="http://www.example.com/poster.jpg")
- 相对URL - 指向同个站点的URL (如: href="poster.jpg")
|
HTML <video> 标签其他扩展