토글 스위치가 있어야 슬라이드가 왼쪽으로 이동하면 div 콘텐츠 구성 요소가 튀어 나오고 슬라이드 오른쪽에는 다른 div 콘텐츠 팝업이 표시됩니다. 어떻게 진행할 수 있습니까?토글 스위치 슬라이더를 전환 할 때 다른 div 요소를 표시합니다.
HTML 콘텐츠
<form>
<label class="switch">
<input type="checkbox" checked="true" />
<div class="slider round"></div>
</label>
</form>
<div id ="menu1">
Menu 1 content
</div>
<div id ="menu2">
Menu 2 content
</div>
CSS의 콘텐츠는 토글 DIV id="menu1"
의 권리 내용을 슬라이드하면 표시 및 슬라이드 왼쪽 내용에 할 수처럼 내가 원하는 볼 수 있듯이
/* The switch - the box around the slider */
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}
/* Hide default HTML checkbox */
.switch input {display:none;}
/* The slider */
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .slider {
background-color: #2196F3;
}
input:focus + .slider {
box-shadow: 0 0 1px #2196F3;
}
input:checked + .slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
}
/* Rounded sliders */
.slider.round {
border-radius: 34px;
}
.slider.round:before {
border-radius: 50%;
}
div id="menu2"
을 표시 할 수 있습니다. 슬라이드에서 div 콘텐츠 구성 요소가 튀어 나오면 오른쪽으로 슬라이드가 전환되는 토글 스위치가 있어야합니다. 팝업 팝업. 어떻게 진행할 수 있습니까?