我该如何更改CSS代码,使徽标(#logo)在左上角出现在所有其他div上?较高的Z-index值不会改变位置:/例如,当您单击“沙龙”并滚动时,图片和文本将滚动到徽标上方,而不是下方。如何在内容上放置徽标? (Z-Index被忽略)
这里的链接: http://hosting2022.esy.es/
/* HEADER WITH LOGO */
header {
width:100%;
position: fixed;
top: 0px;
z-index:2000;
height: 80px;
}
#header-wrapper {
width: 1280px;
margin: 0 auto;
z-index:9999;
height:80px;
line-height:80px;
position:relative;
}
#logo {
margin:20px 0;
height:40px;
width:auto;
float:left;
}
/* MAIN DIV WITH MENU AND CONTENT-DIV*/
#mainx {
padding: 0 0 0 0 !important;
margin: 0 !important;
border: 0 !important;
position: fixed;
z-index: 11000;
}
/* THE MENU DIV */
#menuxx {
line-height:50%;
z-index:21000;
top:35px;
right:105px;
width:450px;
height:70px;
position:fixed;
}
/*CONTENT DIV -> Should be placed under the logo and menu*/
#Salon {
top:0;
margin-left: auto;
margin-right: auto;
width: 100%;
height:100%;
position:fixed;
overflow:hidden;
}
请添加代码在你的问题 –
你的意思是说可以你请解释一下。? –
我希望代码片段有所帮助。该网站的标志应始终位于所有div的顶部。 – Martin