123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta content="yes" name="apple-mobile-web-app-capable" />
- <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no" />
- <title>沙盘播放</title>
- </head>
- <link rel="stylesheet" href="./TemplateData/style.css">
- <style>
- #initVideo{
- position: fixed;
- width: 100%;
- transform: translate(-50%,-50%);
- left: 50%;
- top: 50%;
- display: inline-block;
- }
- .tips{
- display: none;
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- z-index: 111111;
- background: rgba(0, 0, 0, 0.5);
- }
- .tips > span{
- position: absolute;
- top: 50%;
- left: 50%;
- display: inline-block;
- transform: translate(-50%,-50%);
- background: #fff;
- border-radius: 20px;
- padding: 14px 26px;
- }
- /*横屏*/
- @media (orientation:landscape) {
- body{
- background-color: #000;
- }
- #initVideo{
- width: auto;
- height: 100%;
- }
- .tips{
- display: block;
- animation:showMask 10s forwards;
- }
- }
- /*竖屏*/
- @media (orientation:portrait){ }
- @keyframes showMask
- {
- 0% {
- opacity: 1;
- }
- 80%{
- opacity: 1;
- }
- 100% {
- display: none;
- opacity: 0;
- pointer-events: none;
- }
- }
- </style>
- <body>
- <video id="initVideo" src="./mobile.mp4" x5-video-player-type="h5" x5-video-player-fullscreen="true" webkit-playsinline="" playsinline="" x5-playsinline="" crossorigin="anonymous"> </video>
- <div class="welcome">
- <span id="enter">进入沙盘</span>
- </div>
- <div class="tips">
- <span>竖屏效果展示更佳</span>
- </div>
- <script>
-
- window.initVideo = document.getElementById("initVideo");
- document.addEventListener(
- 'WeixinJSBridgeReady',
- function() {
- window.initVideo.play();
- },
- false
- );
- // window.initVideo.play();
- let elem = document.querySelector('#enter')
- elem.addEventListener('click',function () {
- let ele = document.querySelector('.welcome')
- ele.style.display = 'none'
- window.initVideo.play();
- })
- </script>
- </body>
- </html>
- <script>
- </script>
|