<css>
#contents .notice_gal h3{position: absolute; left: 0; top: 0;
width: 100px; height: 30px; padding: 5px 10px; background: #ccc;
color: #fff; text-align: center; cursor: pointer;}
#contents .notice_gal h3.r100{left: 120px;}
#contents .notice_gal h3.on{background: peru;}
#contents .notice_gal ul{position: absolute; left: 0; top: 40px; display: none;}
#contents .notice_gal ul.on{display: block;}
.gal li a{display: block; width: 100%; height: 100%;}
<js>
$('.notice_gal h3').click(function(){
$('.notice_gal h3,.notice_gal ul').removeClass('on');
$(this).addClass('on');
$(this).next('ul').addClass('on');
});
'웹디자인기능사' 카테고리의 다른 글
웹디자인기능사 실기 / 슬라이드2 (0) | 2022.04.02 |
---|---|
웹디자인 기능사 실기 / 메뉴 세로배치 css (0) | 2022.03.22 |
웹디자인기능사 실기 / gnb 종류별 제이쿼리 (0) | 2022.03.13 |
웹디자인기능사 실기/ 슬라이드 (0) | 2022.03.13 |
웹디자인기능사 실기 / 레이어 팝업창 (0) | 2022.03.13 |