1. 程式人生 > >彈窗播放視訊

彈窗播放視訊

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>視訊播放彈窗</title>
  <style>
     /*彈窗*/
    .tc_bg{width: 100%; height: 100%; background: rgba(0,0,0,0.8); position: fixed; top: 0; left: 0; z-index: 10;}
    .tc_video{width: 800px; height: 450px; position: absolute; top: 50%; left: 0; margin: -2.11rem 0 0 0;}
    #container{width: 800px; height: 450px;}
    .dia-close{display: block; width: 0.5rem; height: 0.5rem; font-size: 0.4rem; text-align: center; line-height: 0.5rem; position: absolute; top: -0.6rem; right: 0.1rem; color: #fff; border-radius: 50%; border: 0.04rem solid #fff;}
  </style>
</head>
<body>
  
  <a href="javascript:playVideo()">點選播放視訊</a>

<!-- 彈窗 視訊 S -->
<div class="tc_bg" id="tcVideo" style="display:none">
    <div class="tc_video">
        <div id="container"></div>
        <a class="dia-close" href="javascript:hideBox('tcVideo');" title="關閉">×</a>
    </div>
</div>
<!-- 彈窗 視訊 E -->
</body>
</html>