【发布时间】:2018-06-28 22:21:20
【问题描述】:
这是我体内的 html
此代码适用于覆盖 div 并在顶部覆盖的视频。我可以使用帮助,因为视频没有出现在 chrome 中。我试过使用webm。文件和 ogv 但它不工作。
感谢您提供任何和所有帮助。
<section>
<div class="jumbotron jumbotron-fluid" id="hero">
<div class="container">
<h3 class="hero-subtitle">Lorem Ipsum</h1>
<p class="hero-content">The main content goes here </p>
<br>
<h6 class="hero-excerpt">subtitle </h6>
</div>
</div>
</section>
CSS 页面
#hero {
min-height: 70vh;
background:
/* top, transparent red, faked with gradient */
linear-gradient(
rgba(0, 0, 0, 0.85),
rgba(0, 0, 0, 0.45)
),
/* bottom, image */
url('background_video.mp4');
background-position: center;
background-repeat: no-repeat;
background-size: cover;
color: white;
.hero-subtitle {
font-size: 2rem;
font-weight: 300;
line-height: 1.2;
}
.hero-content{
font-size: 1.25rem;
font-weight: 300;
}
.hero-excerpt{
font-size: 1rem;
font-weight: 300;
}
}
【问题讨论】:
-
这段代码中没有引用视频...你怎么称呼视频?
-
由于保密协议,我没有包含视频,任何视频都可以。
-
这不是有效的 html:
<h3 class="hero-subtitle">Lorem Ipsum</h1>(错误的结束标签) - 不确定这是否是导致问题的原因,但应该可以修复。
标签: javascript html css google-chrome