这是一个网页 保存为.html可以看看 谢谢了!
nbsp;HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<script> <br /> var Library = {}; <br /> Library.ease = function () { <br /> this.target = 0; <br /> this.position = 0; <br /> this.move = function (target, speed) <br /> { <br /> this.position += (target - this.position) * speed; <br /> } <br /> } <br /> var tv = { <br /> O : [], <br /> screen : {}, <br /> grid : { <br /> size : 4, <br /> borderSize : 6, <br /> zoomed : false <br /> }, <br /> angle : { <br /> x : new Library.ease(), <br /> y : new Library.ease() <br /> }, <br /> camera : { <br /> x : new Library.ease(), <br /> y : new Library.ease(), <br /> zoom : new Library.ease(), <br /> focalLength : 750 <br /> }, <br /> init : function () <br /> { <br /> this.screen.obj = document.getElementById('screen'); <br /> var img = document.getElementById('bankImages').getElementsByTagName('img'); <br /> this.screen.obj.onselectstart = function () { return false; } <br /> this.screen.obj.ondrag = function () { return false; } <br /> var ni = 0; <br /> var n = (tv.grid.size / 2) - .5; <br /> for (var y = -n; y <= n; y++) <br /> { <br /> for (var x = -n; x <= n; x++) <br /> { <br /> var o = document.createElement('img'); <br /> var i = img[(ni++) % img.length]; <br /> o.className = 'tvout'; <br /> o.src = i.src; <br /> tv.screen.obj.appendChild(o); <br /> o.point3D = { <br /> x : x, <br /> y : y, <br /> z : new Library.ease() <br /> }; <br /> o.point2D = {}; <br /> o.ratioImage = 1; <br /> tv.O.push(o); <br /> o.onmouseover = function () <br /> { <br /> if (!tv.grid.zoomed) <br /> { <br /> if (tv.o) <br /> { <br /> tv.o.point3D.z.target = 0; <br /> tv.o.className = 'tvout'; <br /> } <br /> this.className = 'tvover'; <br /> this.point3D.z.target = -.5; <br /> tv.o = this; <br /> } <br /> } <br /> o.onclick = function () <br /> { <br /> if (!tv.grid.zoomed) <br /> { <br /> tv.camera.x.target = this.point3D.x; <br /> tv.camera.y.target = this.point3D.y; <br /> tv.camera.zoom.target = tv.screen.w * 1.25; <br /> tv.grid.zoomed = this; <br /> } else { <br /> if (this == tv.grid.zoomed){ <br /> tv.camera.x.target = 0; <br /> tv.camera.y.target = 0; <br /> tv.camera.zoom.target = tv.screen.w / (tv.grid.size + .1); <br /> tv.grid.zoomed = false; <br /> } <br /> } <br /> } <br /> o.calc = function () <br /> { <br /> this.point3D.z.move(this.point3D.z.target, .5); <br /> var x = (this.point3D.x - tv.camera.x.position) * tv.camera.zoom.position; <br /> var y = (this.point3D.y - tv.camera.y.position) * tv.camera.zoom.position; <br /> var z = this.point3D.z.position * tv.camera.zoom.position; <br /> var xy = tv.angle.cx * y - tv.angle.sx * z; <br /> var xz = tv.angle.sx * y + tv.angle.cx * z; <br /> var yz = tv.angle.cy * xz - tv.angle.sy * x; <br /> var yx = tv.angle.sy * xz + tv.angle.cy * x; <br /> this.point2D.scale = tv.camera.focalLength / (tv.camera.focalLength + yz); <br /> this.point2D.x = yx * this.point2D.scale; <br /> this.point2D.y = xy * this.point2D.scale; <br /> this.point2D.w = Math.round( <br /> Math.max( <br /> 0, <br /> this.point2D.scale * tv.camera.zoom.position * .8 <br /> ) <br /> ); <br /> if (this.ratioImage > 1) <br /> this.point2D.h = Math.round(this.point2D.w / this.ratioImage); <br /> else <br /> { <br /> this.point2D.h = this.point2D.w; <br /> this.point2D.w = Math.round(this.point2D.h * this.ratioImage); <br /> } <br /> } <br /> o.draw = function () <br /> { <br /> if (this.complete) <br /> { <br /> if (!this.loaded) <br /> { <br /> if (!this.img) <br /> { <br /> this.img = new Image(); <br /> this.img.src = this.src; <br /> } <br /> if (this.img.complete) <br /> { <br /> this.style.visibility = 'visible'; <br /> this.ratioImage = this.img.width / this.img.height; <br /> this.loaded = true; <br /> this.img = false; <br /> } <br /> } <br /> this.style.left = Math.round( <br /> this.point2D.x * this.point2D.scale + <br /> tv.screen.w - this.point2D.w * .5 <br /> ) + 'px'; <br /> this.style.top = Math.round( <br /> this.point2D.y * this.point2D.scale + <br /> tv.screen.h - this.point2D.h * .5 <br /> ) + 'px'; <br /> this.style.width = this.point2D.w + 'px'; <br /> this.style.height = this.point2D.h + 'px'; <br /> this.style.borderWidth = Math.round( <br /> Math.max( <br /> this.point2D.w, <br /> this.point2D.h <br /> ) * tv.grid.borderSize * .01 <br /> ) + 'px'; <br /> this.style.zIndex = Math.floor(this.point2D.scale * 100); <br /> } <br /> } <br /> } <br /> } <br /> tv.resize(); <br /> mouse.y = tv.screen.y + tv.screen.h; <br /> mouse.x = tv.screen.x + tv.screen.w; <br /> tv.run(); <br /> }, <br /> resize : function () <br /> { <br /> var o = tv.screen.obj; <br /> tv.screen.w = o.offsetWidth / 2; <br /> tv.screen.h = o.offsetHeight / 2; <br /> tv.camera.zoom.target = tv.screen.w / (tv.grid.size + .1); <br /> for (tv.screen.x = 0, tv.screen.y = 0; o != null; o = o.offsetParent) <br /> { <br /> tv.screen.x += o.offsetLeft; <br /> tv.screen.y += o.offsetTop; <br /> } <br /> }, <br /> run : function () <br /> { <br /> tv.angle.x.move(-(mouse.y - tv.screen.h - tv.screen.y) * .0025, .1); <br /> tv.angle.y.move( (mouse.x - tv.screen.w - tv.screen.x) * .0025, .1); <br /> tv.camera.x.move(tv.camera.x.target, tv.grid.zoomed ? .25 : .025); <br /> tv.camera.y.move(tv.camera.y.target, tv.grid.zoomed ? .25 : .025); <br /> tv.camera.zoom.move(tv.camera.zoom.target, .05); <br /> tv.angle.cx = Math.cos(tv.angle.x.position); <br /> tv.angle.sx = Math.sin(tv.angle.x.position); <br /> tv.angle.cy = Math.cos(tv.angle.y.position); <br /> tv.angle.sy = Math.sin(tv.angle.y.position); <br /> for (var i = 0, o; o = tv.O[i]; i++) <br /> { <br /> o.calc(); <br /> o.draw(); <br /> } <br /> setTimeout(tv.run, 32); <br /> } <br /> } <br /> var mouse = { <br /> x : 0, <br /> y : 0 <br /> } <br /> document.onmousemove = function(e) <br /> { <br /> if (window.event) e = window.event; <br /> mouse.x = e.clientX; <br /> mouse.y = e.clientY; <br /> return false; <br /> } <br /> </script>
<script> <br /> onresize = tv.resize; <br /> tv.init(); <br /> </script>
回复讨论(解决方案)
<div id="bankImages"><img alt="" src="http://www.cssrain.cn/skins/tim/isll_t.gif">...</div>
Copier après la connexion
中的src?成自已的?片路?就可以了,不?只是你自已程序可以?意?
若你是想??人?站中的?示的?片替??按自已的?片??示,不可能。。。
同意楼上的
HTML code
...
中的src?成自已的?片路?就可以了,不?只是你自已程序可以?意?
若你是想??人?站中的?示的?片替??按自已的?片??示,不可能。。。
+1