有了H5的Video,妈妈再也不用担心我没安Flash插件了

根据Video提供的方法和属性,简单练习了一下,不说废话,直接上图片和代码

HTML5——播放器

<html>
<head>
<title>一明播放器</title>
<style type="text/css">
*{
margin:0px;padding:0px;
}
#v1{
width:400px;
}
#divVideo{
width:400px;height:340px;border:1px solid black;margin:50px auto;
}
input[type="button"]{
width:70px;height:30px;
}
input:first-of-type{
background-color:blue;
}
input:nth-of-type(2){
background-color:red;
}
input:nth-of-type(3){
background-color:pink;
}
</style>
</head>
<body>
<div ;
btnPause.onclick=function(){
v1.pause();
}
btnPlay.onclick=function(){
v1.play();
}
btnLoop.onclick=function(){
v1.load();
}
btnMuted.onclick=function(){
v1.muted=!v1.muted;
}
</script>

 

 

 

相关文章: