두 개의 div가 있는데, 두 개의 div가 있습니다.콘텐츠가있는 두 div 사이를 전환하십시오.
메인 div는 측면 탐색 용이며 이미지 및 메뉴 목록도 포함합니다.
두 divs 토글을 만들 수 있지만 기본 div 안의 내용도 전환하지 않습니다. 내가 jQuery를에 새로 온 사람이 수행 할 수 있습니다 확신으로
<div class="wide">
<img src="images/logo150.png" width="150" height="90">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Latest News</a></li>
</ul>
</div>
<script>
$(".wide").click(function() {
$(this).toggleClass("narrow", 1000, "easeOutSine");
});
</script>
<style>
html {
margin: 0px;
padding: 0px;
height: 100%;
}
body {
height: 100%;
margin: 0px;
padding: 0px;
background-image: url(load/images/1.jpg);
background-repeat: no-repeat;
background-position: left top;
}
.wide {
width: 150px;
height: 100%;
position: fixed;
z-index: 1000;
min-height: 1000%;
background-color: rgba(0,0,0,0.8);
padding-top: 50px;
padding-right: 20px;
padding-bottom: 20px;
padding-left: 20px;
cursor: pointer;
}
.narrow {
width: 50px;
height: 100%;
position: fixed;
z-index: 10;
min-height: 1000%;
padding-top: 50px;
padding-right: 10px;
padding-bottom: 10px;
padding-left: 10px;
cursor: pointer;
background-color: rgba(0,0,0,0.8);
background-image: url(logotop.png);
background-repeat: no-repeat;
background-position: center top;
}
</style>
어떤 도움
이 크게 감사합니다. 는
내 반응에 문제가 : 사용이 오버 플로우를 숨길 필요가 .narrow 클래스에서
? 아니면 다른 곳에서 답을 찾았습니까? 그것이 해결되면 질문을 닫으십시오 :) –