나는 this example을 따르려고했으나 내 필요에 따라 작동하지 못하게되어 도움이 될만한 도움이되었습니다.CSS 하위 메뉴의 스타일을 지정하는 방법은 무엇입니까?
UPDATE : 좋아, 내 하위 메뉴가 더 나은 yourkishore 덕분에 위치 내가 좀 어떻게 지금 중첩 된 메뉴를 처리하기 위해 해결,하지만 내 하위 메뉴는 여전히 내 텍스트의 맨 아래에 바로 나타나고있다?
HTML :
<ul id="menubar">
<div id="title">title</div>
<li>File
<ul>
<li>Photoshop CC</li>
<li>Illustrator CC Adobe</li>
<li>My Web Design
<ul>
<li>HTML</li>
<li>CSS</li>
</ul>
</li>
</ul>
</li>
<li>Config</li>
</ul>
<div id=other></div>
CSS 그것은 당신의 바이올린에서 잘 작동
html, body {height:100%;width:100%;margin:0;}
#menubar {
background: #eeeeee;
height:25%;
list-style-type: none;
width:100%;
display: inline-table;
margin:0;
padding:0;
z-index:99;
}
#menubar #title {
display:inline-block;
padding:0 5%;
font-size:140%;
font-weight:bold;
float:left;
height:100%;
display: inline-flex;
align-items: center;
}
#menubar li {
height:100%;
position:relative;
float:left;
padding:0 1%;
list-style-type: none;
white-space:nowrap;
display: inline-flex;
align-items: center;
}
#menubar li:hover {
background-color:#7faddb;
}
#menubar li > ul {
background-color:white;
z-index:99;
display: none;
position:absolute;
list-style-type: none;
margin:0;
padding:0;
}
#menubar li:hover > ul {
display: block;
}
#other {
background-color:green;
position:absolute;
top:25%;
bottom:0;
left:0;
right:0;
}
내 메뉴 막대에 어떻게 맞을지 잘 모르겠습니다. 나는 아직도 이것에 아주 새롭다 :) – shuji
는 당신의 도구 상자 당 HTML와 CSS를 바꾸었다. 그것을 시도하십시오. –