gpt4 book ai didi

jquery - 页面在横幅/超大屏幕上滚动

转载 作者:行者123 更新时间:2023-11-28 07:06:41 25 4
gpt4 key购买 nike

所以我想重新创建这个效果:http://www.firstprinceproductions.ga/当您开始滚动时,页面的实际内容会在超大屏幕上滚动。到目前为止,我还没有做到这一点。这是我现在拥有的一些代码:

HTML

<div class="jumbotron">
<h1 style="text-shadow: 5px 5px 2px #000;">Team Divinity</h1>
<div class="btn-group" role="group" aria-label="...">
<button type="button" class="btn btn-default"><i class="fa fa-question"></i> About us</button>
<button type="button" class="btn btn-info"><i class="fa fa-share"></i> Share</button>
</div>
</div>

<div class="container">
<div class="news">
<div class="container">
<h2 style="text-align: center;">News</h2>
<div class="understroke"></div>
<div class="col-md-3">
<div class="thumbnail">
<a href="#" class="learnlink"><h3>Website V2.0</h3></a>
<p>We are currently working on the site, this message is currently being displayed manually but will later be displayed useing a data base</p>
<a href="#" class="btn btn-default">Read more</a>
</div>
</div>
</div>
</div>
<div class="games">
<div class="container">
<h2 style="text-align: center;">Games</h2>
<div class="understroke"></div>
<div class="col-md-6">
<div class="thumbnail">
<a href="#"><h3>Test 2</h3></a>
<a href="#"><img src="img/bg.jpg" class="thumbnail-image"></a>
</div>
</div>
<div class="col-md-6">
<div class="thumbnail">
<a href="#"><h3>Test</h3></a>
<a href="#"><img src="img/bg.jpg" class="thumbnail-image"></a>
</div>
</div>
</div>
</div>
</div>

CSS

body {
background-color: #ebebeb;
top: 5px;
bottom: 5px;
overflow-x: hidden;
}

.navbar {
border-bottom: none
}

.jumbotron {
text-align: center;
color: #ebebeb;
background: url("/img/bg.jpg");
}

.understroke {
width: 100%;
height: 1px;
background-color: #C4C4C4
}

.thumbnail {
background: none !important;
color: none !important;
border: none;
border-radius: 0;
}

.news h2 {
font-size: 38px;

}

.news {
background-color: none;
margin: auto 20px;
clear: both;
height: auto;
}

.learnlink {
margin-left: 0;
}

.thumbnail-image {
border: 3px solid #000;
}

.container {
width: 93%;

}

最佳答案

使用 z-indexfixed:position 您可以实现这一点。确保您的容器有顶部 margin。还要确保将页眉的宽度设置为 100% 以使其拉伸(stretch)页面。 http://jsfiddle.net/jemqc4tp/

更改您的容器

.jumbotron {
position:fixed;
top:0;
z-index:-1;
width:100%;
text-align: center;
color: #ebebeb;
background: url("/img/bg.jpg");
}


.container {
width: 93%;
margin-top:200px;
background:white;
}

当然有很多方法可以达到这个结果,这只是一种方法。

关于jquery - 页面在横幅/超大屏幕上滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32909657/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com