Home > Web Front-end > HTML Tutorial > html 视频的控制按钮的问题_html/css_WEB-ITnose

html 视频的控制按钮的问题_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 08:51:01
Original
1607 people have browsed it


一般视频插入,video的播放按钮默认在下边,现在实现如图效果, 想要实现controls 在视频预览图片的中间,就是我们视频网站上的那样,应该怎么做?


回复讨论(解决方案)

你可以先做一个图片在中间的。点击后,触发视频事件。

在video上放个图片,用以下代码绑定事件document.getElementById("imgID").onclick = function () {	document.getElementById("videoID").play();	document.getElementById("imgID").style.display = "none";}
Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template