한국어
간단하고 실용적인 특수 효과 코드입니다.
<style type="text/css"> body { margin: 0px } #div1 { display: none: z-index: height; : 100%; 너비: 100%; 필터:알파(불투명도=30); } #div2 { 디스플레이: 없음; 높이: 100%; %; z -index: 1001; } #div3 { display: block; position: 절대; z-index: 999 } </style> <script type="text/javascript"> //움직이는 객체 정의 var Mouse_Obj=" none",_x,_y; //객체 끌기 기능(자동) document.onmousemove=function() { if(Mouse_Obj!=="none") { document.getElementById(Mouse_Obj).style.left=_x+ event.x; document.getElementById(Mouse_Obj).style.top=_y+event.y; event.returnValue=false; } } //드래그 기능 중지(자동) document.onmouseup=function() { Mouse_Obj="none" ; } //드래그된 객체 함수 o가 드래그된 객체인지 확인 function m(o) { Mouse_Obj=o(document.getElementById(Mouse_Obj).style.left)-event.x; .getElementById(Mouse_Obj).style.top)-event.y; } </script> <div id="div1"></div> <div id="div2" onmousedown="m(this.id)" 스타일 ="왼쪽: 0px;위: 0px;"> <테이블 너비="50%" border="0" cellpadding="3" 세포 간격="1" 스타일="배경: #ff7300; 위치:정적;필터:progid :DXImageTransform.Microsoft.DropShadow (color=#666666,offX=4,offY=4, positives=true)" align="center"> <tr style="cursor: move;"> <td><font color=" #FFFFFF">알림:</font></td> <td align="right"><input type="button" value="x" onClick="document.getElementById ('div1').style.display ='none';document.getElementById ('div2').style.display='none';" style="cursor: hand;"></td> </tr> <tr> <td colspan="2" width="100%" bgcolor="#FFFFFF" height="150" align="middle"><a href="http://www.downcodes.com">http://www.downcodes.com에 오신 것을 환영합니다. </a></td> </tr> </table> </div> <div id="div3"><input type="button" value="레이어 열기" onClick="document.getElementById ('div1 ').style.display='block';document.getElementById ('div2').style.display='block';"></div>