목록WEB/javaScript (19)
귀찮아
let header = document.querySelector("#max_header");let headerHeight = header.offsetHeight;window.onscroll = function () { let windowTop = window.scrollY; // 스크롤 세로값이 헤더높이보다 크거나 같으면 // 헤더에 클래스 'fixed'을 추가한다 if (windowTop >= headerHeight) { header.classList.add("fixed"); } // 아니면 클래스 'fixed'을 제거 else { header.classList.remove("fixed"); }}; 여러개 더 추가할때 (제이쿼리스탈로 재정리)$(document).r..
.category_box {width: 30rem; margin-top:5rem;} .category_box p {margin-bottom: 1rem;} .category_box .cate_select { width:100%; position: relative; display: inline-block;} .category_box .cate_select a { display:flex; align-items: center; justify-content: space-between; font-size: .9em; padding: 0 2rem; background:rgba(0,0,0,.05); border:0; border-bottom:1px solid var(--black); width: auto; height..
@ 배경고정됨 HTML 삽입 미리보기할 수 없는 소스 html 버튼테스트 -- 팝업테스트 닫기 팝업내용 css .popupBg {width:100%;height:100%;background-color:#000;position:fixed;z-index:99999;opacity:0.1;left:0;top:0;display:none} .layerPop {position:fixed;left:0;top:0;width:100%;height:100%;padding:0;border-radius:0;z-index:100000;display:none} .layerPop dl {padding:0;width:430px;height:100%;min-width:320px;height:100%;margin:0 auto;margin..
.quickmenu_area {position: fixed; right:0; top:0; height: 100%; z-index:999;display:flex;} .quickmenu_area .quick_control_box {} .quickmenu_area .quick_control_box ul {display:flex; flex-direction: column; height: 100%; justify-content: center; align-items: flex-end;} .quickmenu_area .quick_control_box ul li {} .quickmenu_area .quick_control_box ul li a {position: relative;width: 50px; height: 5..
보호되어 있는 글입니다.
$( ".팝업오픈버튼" ).click(function(){ $( "#레이어팝업전체영역" ).fadeIn(); }); $( ".레이어팝업안에서닫기버튼" ).click(function(){ $( "#레이어팝업전체영역" ).fadeOut(); });* css에 #레이어팝업전체영역 부분 display:none 으로 해둘것* 팝업오픈버튼 a태그일경우 href 뺄것( 또는 Javascript:; ) 버튼 (한코드로 뭉치기)$(document).on("click", "팝업오픈버튼, 레이어팝업안에서닫기버튼", function() { $("레이어팝업전체영역").fadeToggle();});
보호되어 있는 글입니다.