我怎样才能实现一个重叠和滚动效果像在这个网站上?
[http://www. pravilamag. ru/hero/289163-克谢尼亚-奇林加罗瓦-亚-比拉-拜-韦特罗姆-西罗科-特普利姆-诺-科瓦尔尼姆/](有关网站链接)
只有第一部分(视频和覆盖它的块)是感兴趣的。
预先感谢你的帮助。
我试过这个密码,但没有成功。
<body>
<div class="body-top">
<div class="box-overlap">
<div class="text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Architecto beatae excepturi expedita illum labore magni maiores obcaecati quaerat sunt ut. Asperiores, dolorum in natus neque non quaerat tenetur vero voluptatum?</div>
<div class="text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consequuntur dicta facere molestiae placeat possimus quaerat similique, tempore tenetur voluptate. Aliquid amet consequatur doloremque hic itaque labore nemo quod sapiente voluptatibus?</div>
</div>
<div class="box-1">
<div class="box-inner">
</div>
</div>
</div>
<div class="box-2">
</div>
<script src="index.js"></script>
</body>
.body-top {
background: black;
}
.box-overlap {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: -50vh auto 0;
background: rgba(0, 0, 0, 0.5);
position: relative;
min-height: 100vh;
width: 100%;
}
.box-overlap .text {
font-size: 30px;
padding: 20px 500px;
}
.box-1 {
display: flex;
align-items: center;
top: 0;
margin: 0 auto;
background: #66ffd1;
max-width: 1920px;
min-height: 100vh;
}
.box-2 {
height: 100vh;
width: 100vw;
background: #f5d1ff;
}
.box-inner {
display: flex;
margin: 0 auto;
background: #FF0000;
max-width: 1700px;
min-height: 700px;
width: 100%;
}
1条答案
按热度按时间w8f9ii691#
我希望这能有所帮助: