퀵메뉴 만들기 관련 질문

퀵메뉴 만들기 관련 질문

QA

퀵메뉴 만들기 관련 질문

답변 1

본문

http://www.bnpfood.com/

안녕하세요 해당사이트에 있는 퀵메뉴처럼

접엇다가 나오는 퀵메뉴를 만들고싶은데요

찾아봐도 잘 모르겠어서 질문드립니다 ㅠ 

데이터도 그누보드 폼에 질문게시판에 입력이 되어야하다보니

이거저거 건드려야 할 것같은데 혹시 아시는 고수분 있으실까요 ㅠㅠ

이 질문에 댓글 쓰기 :

답변 1


<style>
.tac {
    text-align: center;
}
#quickmenu_btn, #quickmenu {
    transition-duration: 0.5s;
    transition-timing-function: ease-out;
    transition-property: right;
}
#quickmenu {
    position: fixed;
    top: 100px;
    right: 0;
    width: 250px;
    height: 400px;
    background-color: #555;
}
#quickmenu form ul {
    list-style-type: none;
    padding: 0;
    width: 84%;
    margin: 8%;
}
#quickmenu form ul li {
    margin: 0.3em 0;
}
#quickmenu form label {
    color: #fff;
    font-weight: bold;
}
#quickmenu form input,
#quickmenu form textarea {
    padding: 0.5em;
    display: block;
    width: 100%;
}
#quickmenu form button[type=submit] {
    border: 0;
    border-radius: 4em;
    background-color: #f00;
    color: #fff;
    padding: 0.6em 4em;
    margin: 1em 0;
    font-weight: bold;
}
#quickmenu_btn {
    position: fixed;
    top: 100px;
    right: 250px;
    writing-mode: vertical-rl;
    text-orientation: sideways;
    overflow: hidden;
    display: flex;
    align-items: center;
}
#quickmenu_btn > .chk {
    position: absolute;
    top: -10%;
    left: -20%;
    width: 120%;
    height: 120%;
    opacity: 0;
    padding: 1em 0.2em;
    cursor: pointer;
}
#quickmenu_btn > .btn_txt {
    width: 100%;
    height: 100%;
    background-color: #000;
    color: #fff;
    padding: 1em 0.1em;
    width: 1.8em;
    display: flex;
    align-items: center;
    border-top-left-radius: 0.6em;
    border-bottom-left-radius: 0.6em;
    font-weight: bold;
}
#quickmenu_btn > .chk + .btn_txt::after {
    content: '▲';
    font-size: 0.7em;
    padding-top: 0.5em;
}
#quickmenu_btn > .chk:checked + .btn_txt {
    background-color: #f00;
}
#quickmenu_btn > .chk:checked + .btn_txt::after {
    content: '▼';
}
/*
https://caniuse.com/css-has
Firefox: about:config > layout.css.has-selector.enabled > true
#quickmenu_btn:has(.chk:checked) {
    right: 0;
}
#quickmenu_btn:has(.chk:checked) + #quickmenu {
    right: -250px;
}
*/
#quickmenu_btn[data-chk="true"] {
    right: 0;
}
#quickmenu_btn[data-chk="true"] + #quickmenu {
    right: -250px;
}
</style>
<div id="quickmenu_btn" data-chk="false"><input type="checkbox" class="chk" onclick="this.parentNode.setAttribute('data-chk', this.checked)" /><span class="btn_txt">toggle</span></div>
<div id="quickmenu">
    <form>
        <ul>
            <li><label>name <input type="text" /></label></li>
            <li><label>phone <input type="text" /></label></li>
            <li><label>memo <textarea rows="4"></textarea></label></li>
            <li class="tac"><button type="submit">request</button></li>
        </ul>
    </form>
</div>
asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />
asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />
asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />
asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />
asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />
asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />
asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />
asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />
asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />
asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />
asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />
asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />asdf<br />
답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 18
© SIRSOFT
현재 페이지 제일 처음으로