我想用一些文字覆盖视频。 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/
这是 Chrome 中众所周知的错误吗?有变通办法吗?
最佳答案
这是在最近的版本中修复的。更新谷歌浏览器修复了它。如此简单。
关于html - 在视频上叠加文字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50776253/