Picture display effect of the mouse through the larger picture, support ff_ image effects

Source: Internet
Author: User

<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "http://www.w3c.org/TR/1999/REC-html401-19991224/ Loose.dtd "> <HTML><HEAD><TITLE>5</TITLE> <meta http-equiv=content-type content=" text /html; charset=gb2312 "> <meta http-equiv=imagetoolbar content=no> <style type=text/css>html {Overflow:hidden } body {padding-right:0px; padding-left:0px; BACKGROUND: #000; padding-bottom:0px; margin:0px; width:815px; Cursor:crosshair; padding-top:0px; Position:absolute; height:230px} #box {Border-right:gray 1px solid; Border-top:gray 1px solid; BACKGROUND: #111; Visibility:hidden; Border-left:gray 1px solid; Border-bottom:gray 1px solid; Position:absolute} #screen {Border-right:gray 1px solid; Border-top:gray 1px solid; BACKGROUND: #000; left:0px; Border-left:gray 1px solid; width:815px; Border-bottom:gray 1px solid; Position:absolute; height:230px} #box IMG {border-right:gray 1px solid; Border-tOp:gray 1px solid; Border-left:gray 1px solid; Cursor:pointer; Border-bottom:gray 1px solid; Position:absolute} #box SPAN {font-weight:bold; font-size:12px; width:200px; COLOR: #fff; Font-family:verdana; Position:absolute} #box A {font-size:12px; COLOR: #ff8000; Text-decoration:none} #box a:hover {BACKGROUND: #ff8000; COLOR: #ffffff; Text-decoration:none} #box a:visited {COLOR: #ff8000; Text-decoration:none} #box a:hover:visited {BACKGROUND: #ff8000; COLOR: #ffffff; Text-decoration:none} #lnk {Visibility:hidden} </STYLE> <script type=text/javascript> DOCUMENT.O Nselectstart = new Function ("return false"); O = new Array (); box = 0; img = 0; txt = 0; Tit = 0; W = 0; H = 0; NI = 0; sel = 0; Si = 0; ZOOM = 0; rimg = 0; Speed =. 06; Animation speed delay =. 5; 1 = no delay//////////////////function Dtext () {txt.style.textAlign = Tit.style.textAlign = (SEL&LT;NI/2)? Left ": ' Right '; Txt.innerhtml = O[SEL].TX; tit.innerhtml = O[sel].ti; function CObj (n, S, X, TX, ti) {THIS.N = n; This.dim = s; This.tx = TX; This.ti = Ti; this.is = Img[n]; This.vz = 0; THIS.SX = 0; this.x0 = x; this.x1 = 0; This.zo = 0; This.over = function () {with (this) {if (N!=sel) {O[sel].dim = 250; O[n].dim = ZOOM * 100; sel = n; L = 0; for (k=0; k<ni; k++) {o[k].x0 = l; L + + O[k].dim; } txt.innerhtml = tit.innerhtml = ""; SetTimeout ("Dtext ()", 32); }} This.anim = function () {with (this) {vz = speed* (vz+ (X1-SX) *delay); X1-= VZ; SX = (n==0) 0:o[n-1].x0+o[n-1].dim; Zo-= (Zo-dim) *speed; L = (x1*si) +6* (n+1); W = zo*si; Is.style.left = Math.Round (l) + ' px '; Is.style.top = Math.Round ((h-w*rimg) *.5) + ' px '; Is.style.width = Math.Round (w) + ' px '; Is.style.height = Math.Round (w*rimg) + ' px '; if (sel = = N) {if (sel<ni*.5) {tit.style.left = Txt.style.left = Math.Round (l+w+6) + ' px '; else {tit.style.left = Txt.style.left = Math.Round (L (nx*.25)-6) + ' px '; } Txt.style.top = Math.Round (-(W*RIMG) *.25) + ' px '; Tit.style.top = Math.Round ((w*rimg) *.33) + ' px '; function run () {for (J. O) O[j].anim (); SetTimeout ("Run ()", 16); function Doresize () {tit.style.width = Math.Round (nx*.25) + ' px '; Txt.style.width = Math.Round (nx*.25) + ' px '; Tit.style.fontSize = (NX/30) + ' px '; Txt.style.fontSize = (NX/70) + ' px '; With (box.style) {width = Math.Round (W) + ' px '; Height = Math.Round (H) + ' px '; left = Math.Round (NX/2-W/2) + ' px '; top = Math.Round (NY/2-H/2) + ' px '; } function Resize () {nx = Scr.offsetwidth; NY = scr.offsetheight; W = nx*90/100; Si = (w ((ni+1) *6))/((zoom*180) + ((nI-1) *180)); H = (100*si*rimg) +14; Doresize (); } onresize = resize; onload = function () {SCR = document.getElementById ("screen"); box = document.getElementById ("box"); Tit = document.getElementById ("tit"); txt = document.getElementById ("txt"); img = Box.getelementsbytagname ("img"); LNK = document.getElementById ("lnk"). getElementsByTagName ("a"); NI = Img.length; ZOOM = NI; rimg = Img[0].height/img[0].width; Resize (); s = ZOOM * 100; x = 0; tit.innerhtml = Img[0].title; txt.innerhtml = Img[0].alt; For (i=0 i<ni; i++) {var t = Img[i].alt; if (lnk[i].href!= "") t+= ' <br> ' +lnk[i].innerhtml+ '; O[i] = new CObj (i, S, X, T, Img[i].title); Img[i].alt = ""; Img[i].title = ""; Img[i].onmousedown = new Function ("return false;"); Img[i].onmouseover = new Function (' o[' +i+ '].over (); '); if (lnk[i].href!= "") {/* = = = = = = = = Hyperlink =/Img[i].onclick = new Function (' window.open (' +lnk[i].href+ ', ' _blank '); ' ); } x = = S; s = 250; } box.style.visibility = "visible"; Run (); } </SCRIPT> <meta content= "MSHTML 6.00.6000.20815" name=generator></pead> <BODY> <div id=s creen> <div id=box> <span id=txt ></span><span id=tit></span><span Id=lnk></SPAN ></DIV></DIV><!--crossbrowser images_loading_bar-gerard Ferrandez-www.dhteumeuleu.com-feb 2005- -><span id=lb0 ><span style= "font-size:10px; Left: -120px; COLOR: #ffffff; font-family:arial; Position:absolute; top:8px ">Loading...</SPAN> <span style=" FONT-SIZE:1PX; BACKGROUND: #333; Left: -120px; width:100px; Position:absolute; top:20px; height:10px "><span id=lb1 style=" FONT-SIZE:1PX; BACKGROUND: #ffffff; left:0px; width:0px; Position:absolute; top:0px; height:10px "></SPAN></SPAN></SPAN> <script>m00=document.getelementbyid (" box "). getElementsByTagName ("img"); m01=m00.length;function Images_loading_bar () {m02=0;for (i=0;i<m01;i++) m02+= (m00[i ].complete)? 1:0;document.getelementbyid ("LB1"). Style.width=math.round (m02/m01*100) + ' px '; if (M02==M01) setTimeout ("document.getElementById (' LB0 '). style.display= ' None ' ", 128); else settimeout ("Images_loading_bar ()", 64);}; Images_loading_bar ();</script> <!--end of Images_loading_bar code--></body></ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.