gpt4 book ai didi

css - 让两个
重叠?

转载 作者:行者123 更新时间:2023-11-28 12:34:33 25 4
gpt4 key购买 nike

我在关闭我的容器时遇到问题,所以在我将此标记作为我的标题后,我想在下面添加其他元素但不是容器的一部分 - 如果这有意义的话。我不知道为什么不,但是这个 CSS 没有关闭,它基本上只是使它下面的所有内容成为同一个 CSS 的一部分



CSS:

.menuButton {
background-color: #8dd1c5;
width: 252px;
height: 52px;
position: absolute;
left: 0;
top: 198px;
z-index: 1000;
display: block;
margin-left: -30px;
margin-top: 17px;
text-decoration: none;
}

user agent stylesheeta:-webkit-any-link {
color: -webkit-link;
text-decoration: underline;
cursor: auto;
}

.menuContainer .menuWrap {
width: 222px;
height: 100%;
overflow: hidden;
position: relative;
-moz-box-shadow: 2px 0 5px 0 rgba(0, 0, 0, 0.5);
-webkit-box-shadow: 2px 0 5px 0 rgba(0, 0, 0, 0.5);
box-shadow: 2px 0 5px 0 rgba(0, 0, 0, 0.5);
}

#pusher {
width: 100%;
position: absolute;
}

.pagesContainer .pageContainer {
display: block;
position: absolute;
height: auto;
bottom: 0;
top: 0;
left: 0;
overflow: hidden;
min-width: 770px;
min-height: 570px;
}

.pagesContainer .pageContainer .pageBackgroundContainer {
display: block;
position: absolute;
height: auto;
bottom: 0;
top: 0;
left: 0;
right: 0;
padding: 30px;
overflow: hidden;
}

.hiddenPageButton, .hiddenMenuButton {
top: 228px;
display: none;
width: auto;
margin-left: 0;
padding-left: 20px;
}

.pagesContainer .pageContainer .topBorderText,
.pagesContainer .pageContainer .bottomBorderText {
position: absolute;
margin: 0 auto;
display: block;
top: 0;
left: 50%;
width: 600px;
margin-left: -300px;
z-index: 2000;
}

.pagesContainer .pageContainer .bottomBorderText {
bottom: 0;
top: auto;
}

.pagesContainer .pageContainer {
display: block;
position: absolute;
height: auto;
bottom: 0;
top: 0;
left: 0;
right: 0;
overflow: hidden;
min-width: 770px;
min-height: 570px;
}

html {
position: relative;
height: 100%;
min-width: 1600px;
min-height: 570px;
}

.menuContainer {
min-height: 510px;
width: 222px;
position: fixed;
top: 0;
bottom: 0;
height: auto;
z-index: 3000;
-webkit-perspective: 1000;
-webkit-backface-visibility: hidden;
}

html:

http://pastebin.com/raw.php?i=g0STLR3u

问题是容器占据了整个页面我只想让它占据顶部标题部分。

请帮忙!

最佳答案

我想你想创建这样的菜单 Fiddle Link

我用过<ul><li>对于他们,检查一下:

HTML:

<div class="menuButton">
<ul>
<li>Navigation</li>
<li>Home</li>
<li>About</li>
<li>Contact</li>
<li>Credit</li>
</ul>
</div>

CSS:

.menuButton ul li{
display: inline;
list-style-type: none;
padding-left: 20px;
}
.menuButton {
background-color: #8dd1c5;
width: 500px;
height: 52px;
position: absolute;
left: 0;
top: 198px;
z-index: 1000;
display: block;
margin-left: -30px;
margin-top: 17px;
text-decoration: none;
}

编辑:

更改 min-height: 570pxmin-height: 100%如下:

.pagesContainer .pageContainer {
display: block;
position: absolute;
height: auto;
bottom: 0;
top: 0;
left: 0;
overflow: hidden;
min-width: 770px;
min-height: 100%;
}

关于css - 让两个 <div> 重叠?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18032710/

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