电脑端css:
.content .video{width: 600px; height: 400px; margin: 0 auto; text-align: center; margin-bottom:15px; position: relative;}
.content .video video {width: 100%; height: 100%; object-fit: fill;}
.content .video .VideoBtn {position: absolute; left: 50%; top: 50%; display: block; width: 70px; height: 70px; margin-left: -35px; margin-top: -35px; cursor: pointer; z-index: 10;}
移动端css:
.content .video{width: 340px; height: 240px; margin: 0 auto; text-align: center; margin-bottom:10px; position: relative;}
.content .video video {width: 100%; height: 100%; object-fit: fill;}
.content .video .VideoBtn {position: absolute; left: 50%; top: 50%; display: block; width: 70px; height: 70px; margin-left: -35px; margin-top: -35px; cursor: pointer; z-index: 10;}
<link rel="stylesheet" href="style/css/jsmodern.min.css">
<script src="style/js/jsmodern.min.js"></script>
<div class="content">
<div id="video" class="video">
<video src="<%= rs("video")%>" id="videoShow" autoplay="autoplay"></video>
<span class="VideoBtn"><img src="images/icon_play.png"></span>
</div>
</div>
jsmodern.min.js和jsmodern.min.css下载建站咨询热线
029-33273980