美文网首页
移动页面时,背景图跟着移动的视觉差效果

移动页面时,背景图跟着移动的视觉差效果

作者: AMONTOP | 来源:发表于2019-07-30 15:22 被阅读0次
<!DOCTYPE html>`
<html>
<head>
  <title>Demo</title>
  <link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.4/css/bootstrap.min.css">
  <style>
    .parallax-bg {
      background-attachment: fixed;
      background-repeat: no-repeat;
      background-position: 50% 0;
      -webkit-background-size: cover;
      -moz-background-size: cover;
      -o-background-size: cover;
      background-size: cover;
      height: 500px;
    }
  </style>
</head>
<body>
<section style="height: 1000px;">
  bbbb
</section>
<section>
  <div class="parallax-bg" style='background-image: url("image/bg-parallax-c.png")'>
    <div class="container">
      <div class="row">
        <div class="row light">
          <div class="col-md-5 col-sm-7">
            <h2>Available On All App Store </h2>
            <p class="large">Download now & enjoy app with unimited features</p>
          </div>
        </div>
      </div>
    </div>
  </div>
</section>
</body>
</html>

图片采用以下,感谢http://www.jq22.com/demo/jquerysjmoban201907161024/,更多详情可查看这个页面。

bg-parallax-c.png

相关文章

网友评论

      本文标题:移动页面时,背景图跟着移动的视觉差效果

      本文链接:https://www.haomeiwen.com/subject/dzdnrctx.html