Full screen video issue when using animate.css in Chrome

和自甴很熟 提交于 2019-12-04 10:48:30

This appears to be a Chrome bug. The problem is caused by the animation-fill-mode which is set to both. This keeps the animation active on the videos parent container, which seems to be messing with the full screen video.

Workaround

By changing this back to the default, none, we fix the full screen problem. In this example the animation fill mode is changed with the .custom class.

Example

There is a working example in this jsfiddle.

/*Uncomment the class to fix*/  

/*
.custom {
   animation-fill-mode: none;
}
*/
<link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.4.0/animate.css" rel="stylesheet" />
<h2 id="sv_title">This is the problem, the bottom video is being layered over the top when this is made fullscreen. Uncomment the custom class to see it fix itself.</h2>
<div class="animated fadeInRight custom">
  <video src="http://www.w3schools.com/html/mov_bbb.mp4" controls></video>
</div>

<div class="animated fadeInRight">
  <video src="http://www.w3schools.com/html/mov_bbb.mp4" autoplay muted></video>
</div>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!