我想用文字覆盖一段视频。HTML/CSS在Safari和Firefox中运行良好,但在Chrome中,滚动时文本会消失。下面是一个显示问题的快速视频:
https://imgur.com/2iShiaL
HTML/CSS相当直截了当:
<figure>
<video preload autoplay loop muted playsinline src="https://zachholman.com/video/utc-one.mp4" poster="https://zachholman.com/images/talks/utc/poster-one.jpg">Your browser does not support the video tag.</video>
<h1 style="left:8vw; top:6vw; font-size: 5vw; color:blue;">
<div>What is</div>
<div>Time?</div>
</h1>
</figure>
和
* {
margin: 0;
padding: 0;
}
figure {
position: relative;
}
figure video {
width: 100%;
display: block;
}
figure h1 {
position: absolute;
}
这是密码笔:
https://codepen.io/tcurdt/pen/MXJpPr/
这是一个众所周知的错误在铬?有工作吗?