小编Sch*_*deM的帖子

视差代码不起作用,无法在Chrome预览中显示

我正在尝试第一次制作视差并遇到麻烦。

我正在遵循教程,然后尝试向后工作。但是,代码无法正常工作,我不确定在哪里出错了,我跳到其他一些教程,并尝试调整不同div和CSS块的名称,因此现在的代码有点混乱。

.html {
  height: 100%;
  overflow: hidden;
}

.body {
  max-width: 30px color: #fff;
  margin: 0;
  padding: 0;
  perspective: 1px;
  transform-style: preserve-3d;
  height: 100% overflow-y: scroll;
  overflow-x: "Luna"
}

header {
  box-sizing: border-box;
  min-height: 100vh;
  padding 30vw 0 5vw;
  position: relative;
  transform-style: inherit;
  width: 100vw;
}

header h1 {
  margin-top: -100px;
}

header,
header:before {
  background: 50% 50% / cover;
}

header::before {
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  display: block; …
Run Code Online (Sandbox Code Playgroud)

html css parallax

5
推荐指数
1
解决办法
522
查看次数

标签 统计

css ×1

html ×1

parallax ×1