【问题标题】:HTML,CSS Remaining traces on the page after the animation video is finishedHTML,CSS动画视频播放完后页面残留痕迹
【发布时间】:2022-12-05 02:29:22
【问题描述】:

烟雾动画完成后,它会在右下角停留一点。我不想看到这个并尝试解决这个问题。

其次,页角处有白点。我也希望它是黑色的。我该如何解决这些问题?我在图片中展示了问题。

body {
  margin: 0;
  padding: 0;
}

section {
  height: 100vh;
  background: #000;
}

video {
  object-fit: cover;
}

h1 {
  margin: 0;
  padding: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  text-align: center;
  color: #ddd;
  font-size: 5em;
  font-family: sans-serif;
  letter-spacing: 0.2em;
}

h1 span {
  display: inline-block;
  animation: animate 1s linear forwards;
}

@keyframes animate {
  0% {
    opacity: 0;
    transform: rotateY(90deg);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: rotateY(0deg);
    filter: blur(0px);
  }
}

h1 span:nth-child(1) {
  animation-delay: 1s;
}

h1 span:nth-child(2) {
  animation-delay: 1.5s;
}

h1 span:nth-child(3) {
  animation-delay: 2s;
}

h1 span:nth-child(4) {
  animation-delay: 2.5s;
}

h1 span:nth-child(5) {
  animation-delay: 3s;
}

h1 span:nth-child(6) {
  animation-delay: 3.75s;
}

h1 span:nth-child(7) {
  animation-delay: 4s;
}

h1 span:nth-child(8) {
  animation-delay: 4.5s;
}
<section>
       <video src="smoke.mp4" autoplay muted></video>

  <h1>
    <span>W</span>
    <span>E</span>
    <span>L</span>
    <span>C</span>
    <span>O</span>
    <span>M</span>
    <span>E</span>
  </h1>
</section>

抽烟视频链接:https://drive.google.com/file/d/1ncI67cgjRGoQZHF6I0dEpXwvFwCKxFPK/view

【问题讨论】:

  • 我做了一个 sn-p。目前尚不清楚问题出在哪里,至少在 Chrome 中没有
  • 视频文件也必须在该文件夹中。 (上面的链接)
  • 当你使用谷歌驱动器时,这在 sn-p 中似乎是不可能的

标签: html css


【解决方案1】:

第二部分:

body 
  {
  margin: 0;
  padding: 0;
  background:black;
  }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-04-05
    • 2019-04-16
    • 2019-06-09
    • 1970-01-01
    • 2015-07-08
    • 1970-01-01
    • 2010-11-04
    相关资源
    最近更新 更多