내 웹 사이트를 concrete5로 변환 중입니다. 이 웹 사이트는 반응이 좋을 것으로 예상됩니다. 그래서 저는 작은 화면을위한 반응이 빠른 메뉴를 만들려고합니다.메뉴가 표시되지 않습니다 (CSS 체크 박스)
그러나 내 메뉴 버튼을 클릭하면 메뉴가 표시되지 않습니다 (표시 : 블록으로 전환되지 않음).
코드 :
CSS : (concrete5에서 가져온)
/*Show menu when invisible checkbox is checked*/
input[type=checkbox]:checked ~ ul.nav {
display: block;
}
HTML :
<div id="navwrapper">
<label for="show-menu" class="show-menu">Show Menu</label>
<input type="checkbox" id="show-menu" role="button">
<div id="menu">
<div id="test" class=" ccm-block-styles">
<ul class="nav">
<li class="nav-selected nav-path-selected"><a href="/" target="_self" class="nav-selected nav-path-selected">Home</a></li>
<li class=""><a href="/index.php/biography/" target="_self" class="">biography</a></li>
<li class=""><a href="/index.php/sculptures/" target="_self" class="">sculptures</a></li>
<li class=""><a href="/index.php/drawings/" target="_self" class="">drawings</a></li>
<li class=""><a href="/index.php/paintings/" target="_self" class="">paintings</a></li>
<li class=""><a href="/index.php/installation/" target="_self" class="">installation</a></li>
<li class=""><a href="/index.php/studio/" target="_self" class="">studio</a></li>
<li class=""><a href="/index.php/info/" target="_self" class="">info</a></li>
<li class=""><a href="/index.php/contact/" target="_self" class="">contact</a></li>
</ul>
</div>
<div id="links" class=" ccm-block-styles">
<p><a href="https://www.facebook.com/erlend.vanlandeghem?fref=ts" target="_blank"><img src="/files/cache/3ae097c24f710271444b8d9e77aab5d4_f38.png" alt="facebook.png" width="20" height="20"></a> <img src="/files/cache/5d2604980ec06d13bb257fec2ed03283_f36.png" alt="Linkedin.png" width="20" height="20"> <a href="mailto:[email protected]"><img src="/files/cache/0e6dbc07cf49fee9d65a14a779ce2eff_f37.png" alt="mail.png" width="20" height="20"></a></p>
</div>
당신은 아마도 데모에 대한 링크가 있습니까 : 당신이 인접 형제 선택자 (+)를 사용하는 경우에 작동합니다? – Gezzasa
'input'과'ul'는 공통의 부모를 공유하지 않으므로 선택자가 작동하지 않습니다. 'input [type = checkbox] : 체크 됨 ~ #menu #text ul.nav' 수도 있습니다. –
Paulie_D가 작동하지 않습니다. 데모를 어떻게 링크합니까? – Jacob