0
메뉴 막대와 배경의 위치를 모두 고치려고했습니다.배경과 메뉴 막대를 모두 고정 된 상태로 유지하십시오.
그래서 나는 배경의 위치를 해결하기 위해 몸이 코드를 추가
<body style ="width: 100%; background-image: url(images/bkgd3_1260_black.jpg); background-attachment:fixed; background-size: cover; background-position:center;>
<div id="menu-bar"> xxxxx
</div>
<---other content--->
</body>
을 그리고 즉, 메뉴 바의 위치, 고정 head 태그 아래 코드를 삽입 : 그러나
<head>
<style type="text/css">
#menu-bar {
position: fixed;
left: 0px;
top: 0px;
width: 1000px;
height: 25px;
z-index: 100;
background-color: #040404;
font-family: Calibri;
font-size: 16px;
font-style: normal;
text-transform: none;
text-decoration:none;
color: rgb(231,231,231);
line-height: normal;
letter-spacing: normal;
text-align: left;
word-spacing: normal;
display: table-row;
background-repeat: no-repeat;
border-bottom-width: thin;
border-bottom-style: solid;
border-left-style: none;
border-right-style: none;
border-top-style: none;
border-bottom-color: rgb(204,255,38);
}
</style>
<head>
을 결과는 다음과 같습니다. 배경은 고정되어 있지만 메뉴 표시 줄은 고정되어 있지 않습니다. 아래로 스크롤하면 메뉴 막대가 사라집니다. 나는 실제로 그것이 맨 위에 머물길 원한다.
제안 사항?
나를 위해 작동하는 것 같다 :.? http://jsfiddle.net/ultranaut/scE78/ 더 당신이시키는 것보다 진행 – ultranaut