我想创建一个类似于本网站http://www.theshawcenter.com/#8987上的透视滚动效果。
我尝试过设置背景图像,然后覆盖白色背景,但是它确实草率,而且我无法使其正常工作。
最好的方法是什么?

<body class="mainbackground">
<div class="container-fluid">

   <div class="row whiteheader"></div>
        <div class="row hair">
        </div>
   <div class="row white"></div>
</div>
</body>



.mainbackground{
background-image: url(../app/images/background.png);
background-repeat:no-repeat;
background-size:cover;
}
.hair{
opacity:.2;
}

.white{
background-color:white;
height:300px;
}

.whiteheader{
background-color:white;
height:10px;
}


这是我最新的。

谢谢

最佳答案

尝试使用透明代替,除了白色:)

    background-color:transparent;

关于jquery - 在css中显示图片的一部分的透明区域,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/26539048/

10-12 13:01
查看更多