익명 ·
2023.09.16 ·
조회 9,132
선택 게시판 게시글 작성 버튼 만들기
<p><img src="https://dsclub.kr/data/editor/2309/5baa8178660c7c9f8249cc59a6d92183_1694865788_5469.jpeg" title="5baa8178660c7c9f8249cc59a6d92183_1694865788_5469.jpeg" alt="5baa8178660c7c9f8249cc59a6d92183_1694865788_5469.jpeg"></p><p><span>*</span><span>클릭 전</span> </p><p><span><br></span></p><p><img src="https://dsclub.kr/data/editor/2309/5baa8178660c7c9f8249cc59a6d92183_1694865788_613.jpeg" title="5baa8178660c7c9f8249cc59a6d92183_1694865788_613.jpeg" alt="5baa8178660c7c9f8249cc59a6d92183_1694865788_613.jpeg"><br style="clear:both;">*클릭 후</p><p><br></p><p>[code]<style></p><div> /* 버튼 스타일 */</div><div> #menuButton {</div><div> position: fixed;</div><div> bottom: 70px;</div><div> right: 15px;</div><div> width: 50px;</div><div> height: 50px;</div><div> line-height: 50px;</div><div> border: none;</div><div> border-radius: 50%;</div><div> background: rgba(63, 63, 63);</div><div> color: #ffffff;</div><div> text-align: center;</div><div> font-size: 15px;</div><div> z-index: 99;</div><div> margin-right: 10px;</div><div> cursor: pointer;</div><div> }</div><div> /* 메뉴 스타일 */</div><div> #menu {</div><div> position: fixed;</div><div> bottom: 130px;</div><div> right: 15px;</div><div> display: none;</div><div> z-index: 100;</div><div> background-color: rgba(63, 63, 63);</div><div> border: 1px solid rgba(53, 53, 53, 0.5);</div><div> border-radius: 5px;</div><div> padding: 10px;</div><div> }</div><div> /* 메뉴 버튼 스타일 */</div><div> #menu button {</div><div> display: block;</div><div> width: 100%;</div><div> background: none;</div><div> border: none;</div><div> padding: 5px 0;</div><div> color: #ffffff;</div><div> text-align: left;</div><div> cursor: pointer;</div><div> border-bottom:1px solid #5a5a5a</div><div> }</div><div> /* 메뉴 버튼 호버 스타일 */</div><div> #menu button:hover {</div><div> background-color: rgba(100, 100, 100, 0.5);</div><div> }</div><div> </style></div><div> <!-- 버튼 --></div><div> <button type="button" id="menuButton"></div><div> <i class="fa fa-pencil" aria-hidden="true"></i><span class="sound_only">글쓰기</span></div><div> </button></div><div> <!-- 메뉴 --></div><div> <div id="menu"></div><div> <button onclick="navigateTo('<a href="https://dsclub.kr/bbs/write.php?bo_table=free" rel="nofollow">https://dsclub.kr/bbs/write.php?bo_table=free</a>')">자유게시판</button></div><div> <button onclick="navigateTo('<a href="https://dsclub.kr/bbs/write.php?bo_table=gallery" rel="nofollow">https://dsclub.kr/bbs/write.php?bo_table=gallery</a>')">갤러리</button></div><div> <button onclick="navigateTo('<a href="https://dsclub.kr/bbs/write.php?bo_table=code" rel="nofollow">https://dsclub.kr/bbs/write.php?bo_table=code</a>')">코딩 자료실</button></div><div> <button onclick="navigateTo('<a href="https://dsclub.kr/bbs/write.php?bo_table=zip" rel="nofollow">https://dsclub.kr/bbs/write.php?bo_table=zip</a>')">자료실</button></div><div> <button onclick="navigateTo('<a href="https://dsclub.kr/bbs/write.php?bo_table=it" rel="nofollow">https://dsclub.kr/bbs/write.php?bo_table=it</a>')">IT</button></div><div> <button onclick="navigateTo('<a href="https://dsclub.kr/bbs/write.php?bo_table=blog" rel="nofollow">https://dsclub.kr/bbs/write.php?bo_table=blog</a>')">블로그</button></div><div> </div></div><div> <script></div><div> var menuVisible = false;</div><div> document.getElementById('menuButton').addEventListener('click', function () {</div><div> var menu = document.getElementById('menu');</div><div> if (menuVisible) {</div><div> menu.style.display = 'none';</div><div> } else {</div><div> menu.style.display = 'block';</div><div> }</div><div> menuVisible = !menuVisible;</div><div> });</div><div> function navigateTo(url) {</div><div> window.location.href = url;</div><div> }</div><p> </script>[/code]</p>