<!DOCTYPE html>
<html>
<head>
<title>메뉴예제</title>
<!-- 메뉴 롤오버 스크립트 -->
<script type="text/javascript">
function menu_over(a) {
var preName = 'menu';
var subName = 'sub';
for(var i = 1 ; i < 9 ; i++){
getObject(preName + i).className = 'menu_level_1' + (i == parseInt(a) ? '_over' : '');
getObject(preName + i + subName).className = 'menu_level_2' + (i == parseInt(a) ? '_over' : '');
}
}
function getObject(objName){
return document.getElementById(objName);
}
<!-- // 메뉴 롤오버 스크립트 -->
</script>
<style>
@font-face {font-family:NanumGothic; src:url(img/NanumGothic.eot);}
body,p,h1,h2,h3,h4,h5,h6,ul,ol,li,dl,dt,dd,table,th,td,form,fieldset,legend,input,textarea,button,select{margin:0;padding:0}
body,input,textarea,select,button,table{font-family:'돋움',Dotum,AppleGothic,sans-serif;font-size:12px}
img,fieldset{border:0}
ul,ol{list-style:none}
em,address{font-style:normal}
a{text-decoration:none}
a:hover,a:active,a:focus{text-decoration:underline}
.lnb1 {margin:0 auto;
background:#1F68CA; border:1px solid #1F68CA; width:1000px; height:35px; text-align:left; border-radius: 5px 5px 0 0;
background:#850909 -webkit-gradient(linear, 0% 0%, 0% 100%,from(#5DA0FA), to(#1F68CA));
background:#850909 -moz-linear-gradient(top, #5DA0FA, #1F68CA);
filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#5DA0FA,endColorStr=#1F68CA);
}
.lnb2{margin:0 auto; background:#efefef; border:1px solid #cccccc; width:1000px; height:33px; text-align:left; border-radius: 0 0 5px 5px;}
.menu_level_1 {color:white; font-family:NanumGothic; Font-weight:500; float:left; padding:10px 15px 0 15px; cursor:pointer;}
.menu_level_1_over {color:black; font-family:NanumGothic; Font-weight:500; float:left; background:white; border-radius: 5px 5px 0 0; margin:5px 5px 0 5px; padding:10px 15px 7px 15px; cursor:pointer;}
.menu_level_2 {display:none;}
.menu_level_2_over {display:block;}
.menu_level_2_over div {cursor:pointer; padding:10px; font-family:NanumGothic; padding:10px; cursor:pointer; float:left;}
.menu_level_2_over div:hover {display:block; Font-weight:bold; cursor:pointer;}
</style>
</head>
<body>
<br />
<br />
<br />
<div class="lnb1" style="clear:both;">
<div id="menu1" class="menu_level_1_over" onmouseover="menu_over('1')">Menu1</div>
<div id="menu2" class="menu_level_1" onmouseover="menu_over('2')">메뉴2</div>
<div id="menu3" class="menu_level_1" onmouseover="menu_over('3')">메뉴3</div>
<div id="menu4" class="menu_level_1" onmouseover="menu_over('4')">메뉴4</div>
<div id="menu5" class="menu_level_1" onmouseover="menu_over('5')">메뉴5</div>
<div id="menu6" class="menu_level_1" onmouseover="menu_over('6')">메뉴6</div>
<div id="menu7" class="menu_level_1" onmouseover="menu_over('7')">메뉴7</div>
<div id="menu8" class="menu_level_1" onmouseover="menu_over('8')">메뉴8</div>
</div>
<div class="lnb2" style="clear:both;">
<div id="menu1sub" class="menu_level_2_over">
<div>메뉴1_서브메뉴1</div>
<div>서브메뉴2</div>
<div>서브메뉴3</div>
<div>서브메뉴4</div>
<div>서브메뉴5</div>
<div>서브메뉴6</div>
<div>서브메뉴7</div>
<div>서브메뉴8</div>
</div>
<div id="menu2sub" class="menu_level_2">
<div>메뉴2_서브메뉴1</div>
<div>서브메뉴2</div>
<div>서브메뉴3</div>
<div>서브메뉴4</div>
<div>서브메뉴5</div>
<div>서브메뉴6</div>
<div>서브메뉴7</div>
<div>서브메뉴8</div>
</div>
<div id="menu3sub" class="menu_level_2">
<div>메뉴3_서브메뉴1</div>
<div>서브메뉴2</div>
<div>서브메뉴3</div>
<div>서브메뉴4</div>
<div>서브메뉴5</div>
<div>서브메뉴6</div>
<div>서브메뉴7</div>
<div>서브메뉴8</div>
</div>
<div id="menu4sub" class="menu_level_2">
<div>메뉴4_서브메뉴1</div>
<div>서브메뉴2</div>
<div>서브메뉴3</div>
<div>서브메뉴4</div>
<div>서브메뉴5</div>
<div>서브메뉴6</div>
<div>서브메뉴7</div>
<div>서브메뉴8</div>
</div>
<div id="menu5sub" class="menu_level_2">
<div>메뉴5_서브메뉴1</div>
<div>서브메뉴2</div>
<div>서브메뉴3</div>
<div>서브메뉴4</div>
<div>서브메뉴5</div>
<div>서브메뉴6</div>
<div>서브메뉴7</div>
<div>서브메뉴8</div>
댓글 1개
soon5657
13년 전
ㅎㅎ감사합니다
게시판 목록
팁게시판
디자인과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 4902 | 13년 전 | 3534 | ||
| 4901 |
후라보노보노
|
13년 전 | 2141 | |
| 4900 |
|
13년 전 | 4102 | |
| 4899 |
|
13년 전 | 3364 | |
| 4898 |
|
13년 전 | 4885 | |
| 4897 | 13년 전 | 2683 | ||
| 4896 | 13년 전 | 2151 | ||
| 4895 |
|
13년 전 | 2475 | |
| 4894 |
|
13년 전 | 2815 | |
| 4893 | 13년 전 | 1458 | ||
| 4892 | 13년 전 | 1879 | ||
| 4891 |
|
13년 전 | 1910 | |
| 4890 | 13년 전 | 6099 | ||
| 4889 |
|
13년 전 | 1556 | |
| 4888 |
프로프리랜서
|
13년 전 | 1383 | |
| 4887 | 13년 전 | 1764 | ||
| 4886 |
|
13년 전 | 2226 | |
| 4885 | 13년 전 | 1562 | ||
| 4884 | 13년 전 | 1900 | ||
| 4883 | 13년 전 | 3294 | ||
| 4882 | 13년 전 | 3566 | ||
| 4881 | 13년 전 | 1945 | ||
| 4880 | 13년 전 | 696 | ||
| 4879 | 13년 전 | 5855 | ||
| 4878 |
Giggle
|
13년 전 | 1694 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기