video3

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style type="text/css">
            .div2{
                width: 500px;
                height: 500px;
                background: #87CEEB;
            }
        </style>
    </head>
    <body>
        <video width="600" height="" src="img/shiping.mp4" poster="img/timg.jpg" controls="controls"></video>
         <button>播放</button>
         <button class="fullscreen">全屏</button>
         <img src="img/timg.jpg"/>
         <div class="div2">
             <h1>wxihuanni</h1>
         </div>
         <script type="text/javascript">
             var v1=document.querySelector('video')
             document.querySelector('button').onclick=function(){
                 v1.play()
             }
              document.querySelector('.fullscreen').onclick=function(){
                  v1.webkitRequestFullScreen()
              }
             document.querySelector('img').onclick=function(){
                 document.querySelector('img').webkitRequestFullScreen()
             }
             document.querySelector('.div2').onclick=function(){
                 document.querySelector('.div2').webkitRequestFullScreen()
             }
         </script>g
    </body>
</html>

 

posted @ 2019-03-18 21:59  就这样子吧  阅读(236)  评论(0编辑  收藏  举报