微信浏览器安卓手机video浮在最上层问题

/*  http://blog.csdn.net/kepoon/article/details/53608190  */

//x5-video-player-type="h5" x5-video-player-fullscreen="true" 

<video id="video" src="http://200011112.vod.myqcloud.com/200011112_733d3cea0f8a11e7afae899fa40866b8.f0.mp4" x5-video-player-type="h5" x5-video-player-fullscreen="true" style="background: rgb(0, 0, 0); width: 102.2%; height: 569px; margin-top: -1px; margin-left: -1.1%; margin-right: -1.1%;" id="video" loop="loop" width="100%" preload="auto" poster="" webkit-playsinline="true" playsinline="true" x-webkit-airplay="true" controls="controls"></video>

 

 

微信浏览器里面使用video标签,会自动变成全屏,改成下面就好了,起码可以在video标签之上加入其他元素。

 <video id="videoID"webkit-playsinline="true" x-webkit-airplay="true"  playsinline="true"x5-video-player-type="h5"x5-video-player-fullscreen="true"width="100%" height="100%"preload="auto"  poster="" src="">

 </video>

 

还有个问题,在Android的微信里面,就算加上了上面的属性,还会出现上下有黑边,不能全屏的问题。

解决办法:给video加上object-fit: fill;的style属性。

posted @ 2017-09-08 08:58  面包_girl  阅读(2005)  评论(0编辑  收藏  举报
/* 鼠标点击文字特效 */