html - 在视频上叠加文字

标签 html css google-chrome

我想用一些文字覆盖视频。 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/

相关文章:

html - 在 Angulardart 中创建带有嵌套列表的表

javascript - 页面滚动到 div 的底部

css - 改变 :hover to touch/click for mobile devices

css - Chrome 中的 Div 溢出并带有填充

css - Chrome 清除修复

javascript - 悬停在 ul 子元素上效果 ul after style

JQuery 删除验证

javascript - 当我单击表单标签内的按钮时页面刷新

html - Outlook 2010 中行之间的额外间距

javascript - Chrome 88 不正确的时区符号