网页编程 - 图片特效及右键菜单
<HTML><HEAD><TITLE>图片特效及右键菜单</TITLE> <style type="text/css"> <!-- BODY { SCROLLBAR-FACE-COLOR: #ffffff; SCROLLBAR-HIGHLIGHT-COLOR: #000000; SCROLLBAR-SHADOW-COLOR: #000000; SCROLLBAR-3DLIGHT-COLOR: #cccccc; SCROLLBAR-ARROW-COLOR: #000000; SCROLLBAR-TRACK-COLOR: #ffffff; SCROLLBAR-DARKSHADOW-COLOR: #cccccc } TD { FONT-SIZE: 12px; LINE-HEIGHT: 150%; FONT-FAMILY: verdana; LETTER-SPACING: 1px; font-color: #333333 } FORM { FONT-SIZE: 12px; LINE-HEIGHT: 150%; FONT-FAMILY: verdana; LETTER-SPACING: 1px; font-color: #333333 } SELECT { FONT-SIZE: 12px; LINE-HEIGHT: 150%; FONT-FAMILY: verdana; LETTER-SPACING: 1px; font-color: #333333 } INPUT { FONT-SIZE: 12px; LINE-HEIGHT: 150%; FONT-FAMILY: verdana; LETTER-SPACING: 1px; font-color: #333333 } TEXTAREA { FONT-SIZE: 12px; LINE-HEIGHT: 150%; FONT-FAMILY: verdana; LETTER-SPACING: 1px; font-color: #333333 } BODY { FONT-SIZE: 12px; LINE-HEIGHT: 150%; FONT-FAMILY: verdana; LETTER-SPACING: 1px; font-color: #333333 } A:link { FONT-SIZE: 12px; COLOR: rosybrown; TEXT-DECORATION: none } A:visited { FONT-SIZE: 12px; COLOR: rosybrown; TEXT-DECORATION: none } A:active { FONT-SIZE: 12px; COLOR: rosybrown; TEXT-DECORATION: none } A:hover { BORDER-BOTTOM: #dfdfdf 1px solid; POSITION: relative } .line { FONT-SIZE: 12px; COLOR: #003399; FONT-FAMILY: verdana } .line2 { BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; FONT-SIZE: 12px; BORDER-LEFT-COLOR: #000000; BORDER-BOTTOM-WIDTH: 1px; BORDER-BOTTOM-COLOR: #000000; COLOR: #003399; BORDER-TOP-COLOR: #000000; FONT-FAMILY: verdana; BACKGROUND-COLOR: #efe7de; BORDER-RIGHT-WIDTH: 0px; BORDER-RIGHT-COLOR: #000000 } .line3 { FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: verdana } .fontbig { FONT-SIZE: 10.5pt } .l15 { LINE-HEIGHT: 150% } .l12 { LINE-HEIGHT: 120% } .sd { FILTER: dropShadow(color=#808080, OffX=1, OffY=1, Positive=2) } A.a02:link { FONT-SIZE: 12px; COLOR: rosybrown; TEXT-DECORATION: none } A.a02:active { FONT-SIZE: 12px; COLOR: rosybrown; TEXT-DECORATION: none } A.a02:visited { FONT-SIZE: 12px; COLOR: rosybrown; TEXT-DECORATION: none } A.a02:hover { FONT-SIZE: 12px; COLOR: lightslategray; TEXT-DECORATION: none } A.a01:link { FONT-SIZE: 12px; COLOR: #003399; TEXT-DECORATION: none } A.a01:active { FONT-SIZE: 12px; COLOR: #003399; TEXT-DECORATION: none } A.a01:visited { FONT-SIZE: 12px; COLOR: #003399; TEXT-DECORATION: none } A.a01:hover { FONT-SIZE: 12px; COLOR: #000000; TEXT-DECORATION: none } song { FONT-SIZE: 12px; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; LETTER-SPACING: 1px; font-color: #000000 } .skin0 { BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; VISIBILITY: hidden; BORDER-LEFT: black 1px solid; WIDTH: 100px; CURSOR: default; LINE-HEIGHT: 20px; BORDER-BOTTOM: black 1px solid; FONT-FAMILY: Verdana; POSITION: absolute; BACKGROUND-COLOR: menu } .skin1 { BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; VISIBILITY: hidden; BORDER-LEFT: black 1px solid; WIDTH: 90px; CURSOR: default; LINE-HEIGHT: 20px; BORDER-BOTTOM: black 1px solid; POSITION: absolute; BACKGROUND-COLOR: #ebebeb } .menuitems { PADDING-RIGHT: 5px; PADDING-LEFT: 5px } --> </style> <META http-equiv=Content-Type content="text/html; charset=gb2312"> <SCRIPT> //////////////////////////////////////////////////////////////////////////////normal.js <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v3.0 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features);} //////////////////////////////////////////////////////////////////////////////menu.js //set the skin of the menu (0 or 1, with 1 rendering a default Windows menu like skin) var menuskin=1 //set this variable to 1 if you wish the URLs of the highlighted menu to be displayed in the status bar var display_url=0 function showmenuie5(){ //Find out how close the mouse is to the corner of the window var rightedge=document.body.clientWidth-event.clientX var bottomedge=document.body.clientHeight-event.clientY //if the horizontal distance isn't enough to accomodate the width of the context menu if (rightedge<ie5menu.offsetWidth) //move the horizontal position of the menu to the left by it's width ie5menu.style.left=document.body.scrollLeft+event.clientX-ie5menu.offsetWidth else //position the horizontal position of the menu where the mouse was clicked ie5menu.style.left=document.body.scrollLeft+event.clientX //same concept with the vertical position if (bottomedge<ie5menu.offsetHeight) ie5menu.style.top=document.body.scrollTop+event.clientY-ie5menu.offsetHeight else ie5menu.style.top=document.body.scrollTop+event.clientY ie5menu.style.visibility="visible" return false } function hidemenuie5(){ ie5menu.style.visibility="hidden" } function highlightie5(){ if (event.srcElement.className=="menuitems"){ event.srcElement.style.backgroundColor="#999999" //鼠标移动条 event.srcElement.style.color="#ffffff" //鼠标移动字体 if (display_url==1) window.status=event.srcElement.url } } function lowlightie5(){ if (event.srcElement.className=="menuitems"){ event.srcElement.style.backgroundColor="" event.srcElement.style.color="black" window.status='' } } function jumptoie5(){ if (event.srcElement.className=="menuitems"){ if (event.srcElement.getAttribute("target")!=null) window.open(event.srcElement.url,event.srcElement.getAttribute("target")) else window.location=event.srcElement.url } } //////////////////////////////////////////////////////////////////////////////fade.js <!-- Beginning of JavaScript Code ------------------- function fade_in(which){ theobject=which highlighting=setInterval("highlightit(theobject)",50) } function fade_out(which){ clearInterval(highlighting) which.filters.alpha.opacity=40 } function highlightit(cur){ if (cur.filters.alpha.opacity<100) cur.filters.alpha.opacity+=20 else if (window.highlighting) clearInterval(highlighting) } // -- End of JavaScript Code --> </SCRIPT> <SCRIPT language=javascript> <!-- Image1= new Image(50,50) Image1.src = "images/text/1.gif" Image2 = new Image(50,50) Image2.src = "images/text/2.gif" Image3 = new Image(50,50) Image3.src = "images/text/3.gif" Image4 = new Image(50,50) Image4.src = "images/text/4.gif" Image5 = new Image(50,50) Image5.src = "images/text/5.giff" Image6 = new Image(50,50) Image6.src = "images/text/6.gif" Image7= new Image(50,50) Image7.src = "images/text/7.gif" Image8 = new Image(50,50) Image8.src = "images/text/8.gif" Image9 = new Image(50,50) Image9.src = "images/text/9.gif" Image10 = new Image(50,50) Image10.src = "images/text/10.gif" Image11 = new Image(50,50) Image11.src = "images/text/11.gif" Image12 = new Image(50,50) Image12.src = "images/text/12.gif" //--> </SCRIPT> <META content="MSHTML 5.50.4134.600" name=GENERATOR></HEAD> <BODY bgColor=#ffffff topMargin=20 onload="MM_preloadImages('images/l_1.gif')"><!--[if IE]> <DIV class=skin1 id=ie5menu onmouseover=highlightie5() onclick=jumptoie5() onmouseout=lowlightie5()> <DIV class=menuitems target="newwin" url="">回到首页</DIV> <DIV class=menuitems url="">杂物箱</DIV> <DIV class=menuitems url="">Z档案</DIV> <DIV class=menuitems url="">相册</DIV> <DIV class=menuitems url="">新闻</DIV> <DIV class=menuitems url="">留言板</DIV> <DIV class=menuitems url="">给站长的信</DIV></DIV><![endif]--> <SCRIPT language=JavaScript1.2> if (document.all&&window.print){ if (menuskin==0) ie5menu.className="skin0" else ie5menu.className="skin1" document.oncontextmenu=showmenuie5 document.body.onclick=hidemenuie5 } </SCRIPT> <TABLE height=50 cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD align=middle><BR><BR> <TABLE cellSpacing=0 cellPadding=0 width=600 bgColor=#000000 border=0> <TBODY> <TR> <TD align=middle> <TABLE cellSpacing=1 cellPadding=0 width=600 border=0> <TBODY> <TR> <TD width=75 bgColor=#ffffff><A target=_blank href="images/logo.gif"><IMG onmouseover=fade_in(this); style="FILTER: alpha(opacity=40)" onmouseout=fade_out(this); height=75 src="images/logo.gif" width=75 border=0></A></TD> <TD width=75 bgColor=#eebbcc></TD> <TD width=75 bgColor=#ffffff><A target=_blank href="images/logo.gif"><IMG onmouseover=fade_in(this); style="FILTER: alpha(opacity=40)" onmouseout=fade_out(this); height=75 src="images/logo.gif" width=75 border=0></A></TD> <TD width=75 bgColor=#99cc66> </TD> <TD width=75 bgColor=#ffffff><A target=_blank href="images/logo.gif"><IMG onmouseover=fade_in(this); style="FILTER: alpha(opacity=40)" onmouseout=fade_out(this); height=75 src="images/logo.gif" width=75 border=0></A></TD> <TD width=75 bgColor=#ffb786> </TD> <TD width=75 bgColor=#ffffff><A target=_blank href="images/logo.gif"><IMG onmouseover=fade_in(this); style="FILTER: alpha(opacity=40)" onmouseout=fade_out(this); height=75 src="images/logo.gif" width=75 border=0></A></TD> <TD width=75 bgColor=#eebbcc> </TD></TR> <TR> <TD width=75 bgColor=#ffb786> </TD> <TD width=75 bgColor=#ffffff><A target=_blank href="images/logo.gif"><IMG onmouseover=fade_in(this); style="FILTER: alpha(opacity=40)" onmouseout=fade_out(this); height=75 src="images/logo.gif" width=75 border=0></A></TD> <TD width=75 bgColor=#ffda46> </TD> <TD width=75 bgColor=#ffffff><A target=_blank href="images/logo.gif"><IMG onmouseover=fade_in(this); style="FILTER: alpha(opacity=40)" onmouseout=fade_out(this); height=75 src="images/logo.gif" width=75 border=0></A></TD> <TD width=75 bgColor=#cfceb6> </TD> <TD width=75 bgColor=#ffffff><A target=_blank href="images/logo.gif"><IMG onmouseover=fade_in(this); style="FILTER: alpha(opacity=40)" onmouseout=fade_out(this); height=75 src="images/logo.gif" width=75 border=0></A></TD> <TD width=75 bgColor=#99cc66> </TD> <TD width=75 bgColor=#ffffff><A target=_blank href="images/logo.gif"><IMG onmouseover=fade_in(this); style="FILTER: alpha(opacity=40)" onmouseout=fade_out(this); height=75 src="images/logo.gif" width=75 border=0></A></TD></TR> <TR> <TD width=75 bgColor=#ffffff><A target=_blank href="images/logo.gif"><IMG onmouseover=fade_in(this); style="FILTER: alpha(opacity=40)" onmouseout=fade_out(this); height=75 src="images/logo.gif" width=75 border=0></A></TD> <TD width=75 bgColor=#cfceb6> </TD> <TD width=75 bgColor=#ffffff><A target=_blank href="images/logo.gif"><IMG onmouseover=fade_in(this); style="FILTER: alpha(opacity=40)" onmouseout=fade_out(this); height=75 src="images/logo.gif" width=75 border=0></A></TD> <TD width=75 bgColor=#99cc66> </TD> <TD width=75 bgColor=#ffffff><A target=_blank href="images/logo.gif"><IMG onmouseover=fade_in(this); style="FILTER: alpha(opacity=40)" onmouseout=fade_out(this); height=75 src="images/logo.gif" width=75 border=0></A></TD> <TD width=75 bgColor=#ffda46> </TD> <TD width=75 bgColor=#ffffff><A target=_blank href="images/logo.gif"><IMG onmouseover=fade_in(this); style="FILTER: alpha(opacity=40)" onmouseout=fade_out(this); height=75 src="images/logo.gif" width=75 border=0></A></TD> <TD width=75 bgColor=#ffb786> </TD></TR> <TR bgColor=#ffffff> <TD width=75 bgColor=#99cc66> </TD> <TD width=75><A target=_blank href="images/logo.gif"><IMG onmouseover=fade_in(this); style="FILTER: alpha(opacity=40)" onmouseout=fade_out(this); height=75 src="images/logo.gif" width=75 border=0></A></TD> <TD width=75 bgColor=#ffb786> </TD> <TD width=75><A target=_blank href="images/logo.gif"><IMG onmouseover=fade_in(this); style="FILTER: alpha(opacity=40)" onmouseout=fade_out(this); height=75 src="images/logo.gif" width=75 border=0></A></TD> <TD width=75 bgColor=#eebbcc> </TD> <TD width=75><A target=_blank href="images/logo.gif"><IMG onmouseover=fade_in(this); style="FILTER: alpha(opacity=40)" onmouseout=fade_out(this); height=75 src="images/logo.gif" width=75 border=0></A></TD> <TD width=75 bgColor=#cfceb6> </TD> <TD width=75><A target=_blank href="images/logo.gif"><IMG onmouseover=fade_in(this); style="FILTER: alpha(opacity=40)" onmouseout=fade_out(this); height=75 src="images/logo.gif" width=75 border=0></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><BR></BODY></HTML>
本站
说明
网页版
站长
简介
微博
日记
照片
同学
资料
文章
电脑
编程
维护
链接
功能
电话
短信
邮件
登录