有人可以向我解释为什么这个Bootstrap Carousel
会让Google Chrome浏览器上的HTML5视频闪烁吗?每次旋转木马改变图像时,下面的视频都会闪烁,我不明白这有什么问题,它与课程有关"嵌入式响应嵌入式响应-16by9"在视频包装器上,就像我删除课程时问题停止发生但我需要在页面上有一个响应式视频。
https://codepen.io/anon/pen/zREPqP
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<h2>Carousel Example</h2>
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img src="https://www.w3schools.com/bootstrap/la.jpg" alt="Los Angeles" style="width:100%;">
</div>
<div class="item">
<img src="https://www.w3schools.com/bootstrap/chicago.jpg" alt="Chicago" style="width:100%;">
</div>
<div class="item">
<img src="https://www.w3schools.com/bootstrap/ny.jpg" alt="New york" style="width:100%;">
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div class="row">
<div class="col-md-offset-2 col-md-8">
<div class="embed-responsive embed-responsive-16by9"><video src="//player.vimeo.com/external/159873222.hd.mp4?s=54c0141dd1e7ab5a78a2fda1d69a9f011c89bf42&profile_id=113" poster="http://cletadmin.git-staging.clet.edu.au/assets/images/video/why-study.jpg" controls="controls" width="300" height="150"></video></div></div>
</div>
</body>
</html>
重现的步骤:打开Chrome上面的链接并让滑块播放,不要在视频上播放,只需观察它从海报图像闪烁到灰色背景。
答案 0 :(得分:0)
对我来说,它适用于:
.embed-responsive {
z-index:1000
}