롤오버 버튼 효과를 구현하려면 2개의 이미지가 필요하지만, 스타일 시트를 이용하여 한개의 이미지로 3가지 (보통,오버,클릭) 버튼의 효과를 구현할 수 있습니다
샘플을 참고 하세요
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<title> jasko sample script </title>
<!---- [1단계] 아래 코드를 <HEAD> 와 <HEAD> 태그 사이에 붙여 넣으세요 --->
<style type="text/css">
<!--
/* 배경색을 지정합니다. 이 배경색을 바꾸려면 아래 버튼(.btnout)의 색상도 같이 수정해 주어야 합니다 */
body { background:gold;}
/* 버튼 메뉴 전체의 위치와 크기를 설정 합니다 */
#btn { position:absolute; top:10px; left:10; width:150px; z-index:1;}
/* 평상시 보여지는 버튼의 모양입니다 */
.btnout {
border:gold 1px solid;
padding:2 0 0 0;
margin:2px;
}
/* 마우스를 대었을때 보여질 버튼의 보양입니다 */
.btnup {
border-top: white 1px solid;
border-right: green 1px solid;
border-bottom: green 1px solid;
border-left: white 1px solid;
padding:0 0 0 0;
margin:2px;
}
/* 마우스를 클릭 했을때 보여질 모양입니다 */
.btndown {
border-top: black 1px solid;
border-right: white 1px solid;
border-bottom: white 1px solid;
border-left: black 1px solid;
padding:0 0 0 0;
margin:2px;
}
-->
</style>
</head>
<body>
<!---- [2단계] 아래의 방법으로 <BODY> 와 <BODY> 태그 사이에 붙여 넣으세요 --->
<div id=btn>
<a href="#" target="_blank"><span id=menu0 class=btnout><img src="button.gif" border=0 alt=""></span></a><br>
<a href="#" target="_blank"><span id=menu1 class=btnout><img src="button.gif" border=0 alt=""></span></a><br>
<a href="#" target="_blank"><span id=menu2 class=btnout><img src="button.gif" border=0 alt=""></span></a><br>
<a href="#" target="_blank"><span id=menu3 class=btnout><img src="button.gif" border=0 alt=""></span></a><br>
<a href="#" target="_blank"><span id=menu4 class=btnout><img src="button.gif" border=0 alt=""></span></a><br>
<a href="#" target="_blank"><span id=menu5 class=btnout><img src="button.gif" border=0 alt=""></span></a><br>
<a href="#" target="_blank"><span id=menu6 class=btnout><img src="button.gif" border=0 alt=""></span></a><br>
<a href="#" target="_blank"><span id=menu7 class=btnout><img src="button.gif" border=0 alt=""></span></a>
</div>
<SCRIPT language=JavaScript>
<!--
menuNumber = 8; // 전체 버튼의 갯수를 적어 주세요
maxWidth = 0;
for(i=0; i < menuNumber; i++){
menu = eval('menu' + i);
maxWidth = Math.max(maxWidth, menu.innerText.length);
menu.onselectstart = function(){return false}
menu.onmouseout = function(){
this.className = 'btnout';
}
menu.onmouseover = function(){
this.className = 'btnup';
}
menu.onmouseup = function(){
this.className = 'btnup';
}
menu.onmousedown = function(){
this.className = 'btndown';
}
}
for (i=0 ; i < menuNumber ; i++){
menu = eval('menu' + i);
menu.style.pixelWidth = maxWidth * 8;
}
-->
</SCRIPT>
<!------------------------- 여기까지 ------------------------------------>
</body>
</html><div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]</div>
샘플을 참고 하세요
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<title> jasko sample script </title>
<!---- [1단계] 아래 코드를 <HEAD> 와 <HEAD> 태그 사이에 붙여 넣으세요 --->
<style type="text/css">
<!--
/* 배경색을 지정합니다. 이 배경색을 바꾸려면 아래 버튼(.btnout)의 색상도 같이 수정해 주어야 합니다 */
body { background:gold;}
/* 버튼 메뉴 전체의 위치와 크기를 설정 합니다 */
#btn { position:absolute; top:10px; left:10; width:150px; z-index:1;}
/* 평상시 보여지는 버튼의 모양입니다 */
.btnout {
border:gold 1px solid;
padding:2 0 0 0;
margin:2px;
}
/* 마우스를 대었을때 보여질 버튼의 보양입니다 */
.btnup {
border-top: white 1px solid;
border-right: green 1px solid;
border-bottom: green 1px solid;
border-left: white 1px solid;
padding:0 0 0 0;
margin:2px;
}
/* 마우스를 클릭 했을때 보여질 모양입니다 */
.btndown {
border-top: black 1px solid;
border-right: white 1px solid;
border-bottom: white 1px solid;
border-left: black 1px solid;
padding:0 0 0 0;
margin:2px;
}
-->
</style>
</head>
<body>
<!---- [2단계] 아래의 방법으로 <BODY> 와 <BODY> 태그 사이에 붙여 넣으세요 --->
<div id=btn>
<a href="#" target="_blank"><span id=menu0 class=btnout><img src="button.gif" border=0 alt=""></span></a><br>
<a href="#" target="_blank"><span id=menu1 class=btnout><img src="button.gif" border=0 alt=""></span></a><br>
<a href="#" target="_blank"><span id=menu2 class=btnout><img src="button.gif" border=0 alt=""></span></a><br>
<a href="#" target="_blank"><span id=menu3 class=btnout><img src="button.gif" border=0 alt=""></span></a><br>
<a href="#" target="_blank"><span id=menu4 class=btnout><img src="button.gif" border=0 alt=""></span></a><br>
<a href="#" target="_blank"><span id=menu5 class=btnout><img src="button.gif" border=0 alt=""></span></a><br>
<a href="#" target="_blank"><span id=menu6 class=btnout><img src="button.gif" border=0 alt=""></span></a><br>
<a href="#" target="_blank"><span id=menu7 class=btnout><img src="button.gif" border=0 alt=""></span></a>
</div>
<SCRIPT language=JavaScript>
<!--
menuNumber = 8; // 전체 버튼의 갯수를 적어 주세요
maxWidth = 0;
for(i=0; i < menuNumber; i++){
menu = eval('menu' + i);
maxWidth = Math.max(maxWidth, menu.innerText.length);
menu.onselectstart = function(){return false}
menu.onmouseout = function(){
this.className = 'btnout';
}
menu.onmouseover = function(){
this.className = 'btnup';
}
menu.onmouseup = function(){
this.className = 'btnup';
}
menu.onmousedown = function(){
this.className = 'btndown';
}
}
for (i=0 ; i < menuNumber ; i++){
menu = eval('menu' + i);
menu.style.pixelWidth = maxWidth * 8;
}
-->
</SCRIPT>
<!------------------------- 여기까지 ------------------------------------>
</body>
</html><div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]</div>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 1130 | 18년 전 | 2462 | ||
| 1129 | 18년 전 | 2445 | ||
| 1128 | 18년 전 | 2318 | ||
| 1127 | 18년 전 | 2551 | ||
| 1126 |
|
18년 전 | 3846 | |
| 1125 | 18년 전 | 3646 | ||
| 1124 |
|
18년 전 | 2080 | |
| 1123 | 18년 전 | 2015 | ||
| 1122 | 18년 전 | 1552 | ||
| 1121 | 18년 전 | 3880 | ||
| 1120 | 18년 전 | 5891 | ||
| 1119 | 18년 전 | 6977 | ||
| 1118 | 18년 전 | 2461 | ||
| 1117 |
BEST79
|
18년 전 | 2705 | |
| 1116 | 18년 전 | 4174 | ||
| 1115 | 18년 전 | 2171 | ||
| 1114 |
|
18년 전 | 3623 | |
| 1113 | 18년 전 | 2869 | ||
| 1112 | 18년 전 | 2724 | ||
| 1111 | 18년 전 | 2191 | ||
| 1110 | 18년 전 | 2459 | ||
| 1109 | 18년 전 | 2590 | ||
| 1108 | 18년 전 | 3081 | ||
| 1107 | 18년 전 | 3725 | ||
| 1106 | 18년 전 | 3265 | ||
| 1105 | 18년 전 | 2771 | ||
| 1104 |
|
18년 전 | 2267 | |
| 1103 | 18년 전 | 2933 | ||
| 1102 | 18년 전 | 3021 | ||
| 1101 | 18년 전 | 2534 | ||
| 1100 | 18년 전 | 2296 | ||
| 1099 | 18년 전 | 3323 | ||
| 1098 | 18년 전 | 4844 | ||
| 1097 | 18년 전 | 5068 | ||
| 1096 | 18년 전 | 2289 | ||
| 1095 | 18년 전 | 2183 | ||
| 1094 | 18년 전 | 4994 | ||
| 1093 | 18년 전 | 8952 | ||
| 1092 | 18년 전 | 2036 | ||
| 1091 |
DeepnBlue
|
18년 전 | 4916 | |
| 1090 |
|
18년 전 | 4362 | |
| 1089 |
도날드주주
|
18년 전 | 2602 | |
| 1088 |
|
18년 전 | 4957 | |
| 1087 | 18년 전 | 2783 | ||
| 1086 | 18년 전 | 3665 | ||
| 1085 | 18년 전 | 2614 | ||
| 1084 | 18년 전 | 3427 | ||
| 1083 | 18년 전 | 1938 | ||
| 1082 | 18년 전 | 5370 | ||
| 1081 | 18년 전 | 1684 | ||
| 1080 | 18년 전 | 6047 | ||
| 1079 |
|
18년 전 | 2871 | |
| 1078 | 18년 전 | 6032 | ||
| 1077 |
|
18년 전 | 6833 | |
| 1076 | 18년 전 | 3725 | ||
| 1075 | 18년 전 | 2204 | ||
| 1074 |
hwatta
|
18년 전 | 2093 | |
| 1073 | 18년 전 | 6894 | ||
| 1072 | 18년 전 | 2390 | ||
| 1071 | 18년 전 | 3946 | ||
| 1070 |
|
18년 전 | 5341 | |
| 1069 | 18년 전 | 2689 | ||
| 1068 | 18년 전 | 1736 | ||
| 1067 | 18년 전 | 1568 | ||
| 1066 | 18년 전 | 1516 | ||
| 1065 | 18년 전 | 1796 | ||
| 1064 | 18년 전 | 1789 | ||
| 1063 | 18년 전 | 1777 | ||
| 1062 | 18년 전 | 1714 | ||
| 1061 | 18년 전 | 2502 | ||
| 1060 | 18년 전 | 2302 | ||
| 1059 | 18년 전 | 3461 | ||
| 1058 | 18년 전 | 2588 | ||
| 1057 | 18년 전 | 2573 | ||
| 1056 | 18년 전 | 3408 | ||
| 1055 | 18년 전 | 4620 | ||
| 1054 | 18년 전 | 2959 | ||
| 1053 | 18년 전 | 2797 | ||
| 1052 | 18년 전 | 3344 | ||
| 1051 | 18년 전 | 6276 | ||
| 1050 | 18년 전 | 2177 | ||
| 1049 | 18년 전 | 1986 | ||
| 1048 | 18년 전 | 1937 | ||
| 1047 | 18년 전 | 2002 | ||
| 1046 | 18년 전 | 3188 | ||
| 1045 | 18년 전 | 2258 | ||
| 1044 | 18년 전 | 1947 | ||
| 1043 | 18년 전 | 1616 | ||
| 1042 | 18년 전 | 2077 | ||
| 1041 | 18년 전 | 3357 | ||
| 1040 | 18년 전 | 3226 | ||
| 1039 | 18년 전 | 1912 | ||
| 1038 | 18년 전 | 1481 | ||
| 1037 | 18년 전 | 3180 | ||
| 1036 | 18년 전 | 2053 | ||
| 1035 | 18년 전 | 1613 | ||
| 1034 | 18년 전 | 2836 | ||
| 1033 | 18년 전 | 1965 | ||
| 1032 | 18년 전 | 1840 | ||
| 1031 | 18년 전 | 1810 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기