ASP源码.NET源码PHP源码JSP源码JAVA源码DELPHI源码PB源码VC源码VB源码Android源码
当前位置:首页 >> 网页制作 >> Javascript教程 >> 图片旋转,鼠标滚轮缩放,镜像,切换图片js代码

图片旋转,鼠标滚轮缩放,镜像,切换图片js代码

来源:网络整理     时间:2016-01-15     关键词:

本篇文章主要介绍了"图片旋转,鼠标滚轮缩放,镜像,切换图片js代码",主要涉及到方面的内容,对于Javascript教程感兴趣的同学可以参考一下: demo下载地 址:http://download.csdn.net/detail/cometwo/9404811感谢博客:http://www.cnblogs...

图片旋转,鼠标滚轮缩放,镜像,切换图片js代码

demo下载地 址:http://download.csdn.net/detail/cometwo/9404811

感谢博客:http://www.cnblogs.com/cloudgamer/archive/2010/08/16/ImageTrans.html

<!DOCTYPE html><htmllang="zh-cn"><head><title>图片旋转,鼠标滚轮缩放,镜像,切换图片</title><metacharset="utf-8" /><!--<script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>--><scripttype="text/javascript"src="js/abc.js"></script></head><body><h1style="text-align: center;color: blue;">效果预览</h1><script>//容器对象var ImageTrans = function(container, options) {this._initialize(container, options);
                this._initMode();
                if (this._support) {
                    this._initContainer();
                    this._init();
                } else { //模式不支持this.onError("not support");
                }
            };
            ImageTrans.prototype = {
                //初始化程序
                _initialize: function(container, options) {var container = this._container = $$(container);
					this._clientWidth = container.clientWidth; //变换区域宽度this._clientHeight = container.clientHeight; //变换区域高度this._img = new Image(); //图片对象this._style = {}; //备份样式this._x = this._y = 1; //水平/垂直变换参数this._radian = 0; //旋转变换参数this._support = false; //是否支持变换this._init = this._load = this._show = this._dispose = $$.emptyFunction;
                    var opt = this._setOptions(options);
                    this._zoom = opt.zoom;
                    this.onPreLoad = opt.onPreLoad;
                    this.onLoad = opt.onLoad;
                    this.onError = opt.onError;
                    this._LOAD = $$F.bind(function() {this.onLoad();
						this._load();
						this.reset();
						this._img.style.visibility = "visible";
					}, this);
					$$CE.fireEvent(this, "init");
                },
                //设置默认属性
                _setOptions: function(options) {this.options = { //默认值
                        mode: "css3|filter|canvas",
                        zoom: .1, //缩放比率
                        onPreLoad: function() {}, //图片加载前执行
                        onLoad: function() {}, //图片加载后执行
                        onError: function(err) {} //出错时执行
                    };
                    return $$.extend(this.options, options || {});
				},
				//模式设置
				_initMode: function() {var modes = ImageTrans.modes;
					this._support = $$A.some(this.options.mode.toLowerCase().split("|"), function(mode) {
						mode = modes[mode];
						if (mode && mode.support) {
							mode.init && (this._init = mode.init); //初始化执行程序
							mode.load && (this._load = mode.load); //加载图片执行程序
							mode.show && (this._show = mode.show); //变换显示程序
							mode.dispose && (this._dispose = mode.dispose); //销毁程序//扩展变换方法
							$$A.forEach(ImageTrans.transforms, function(transform, name) {this[name] = function() {
									transform.apply(this, [].slice.call(arguments));
									this._show();
								}
							}, this);
							returntrue;
						}
					}, this);
				},
				//初始化容器对象
				_initContainer: function() {var container = this._container,
						style = container.style,
						position = $$D.getStyle(container, "position");
					this._style = {
						"position": style.position,
						"overflow": style.overflow
					}; //备份样式if (position != "relative" && position != "absolute") {
						style.position = "relative";
					}
					style.overflow = "hidden";
					$$CE.fireEvent(this, "initContainer");
				},
				//加载图片
				load: function(src) {if (this._support) {
						var img = this._img,
							oThis = this;
						img.onload || (img.onload = this._LOAD);
						img.onerror || (img.onerror = function() {
							oThis.onError("err image");
						});
						img.style.visibility = "hidden";
						this.onPreLoad();
						img.src = src;
					}
				},
				//重置
				reset: function() {if (this._support) {
						this._x = this._y = 1;
						this._radian = 0;
						this._show();
					}
				},
				//销毁程序
				dispose: function() {if (this._support) {
						this._dispose();
						$$CE.fireEvent(this, "dispose");
						$$D.setStyle(this._container, this._style); //恢复样式this._container = this._img = this._img.onload = this._img.onerror = this._LOAD = null;
					}
				}
			};
			//变换模式
			ImageTrans.modes = function() {var css3Transform; //ccs3变换样式//初始化图片对象函数functioninitImg(img, container) {
					$$D.setStyle(img, {
						position: "absolute",
						border: 0,
						padding: 0,
						margin: 0,
						width: "auto",
						height: "auto", //重置样式
						visibility: "hidden"//加载前隐藏
					});
					container.appendChild(img);
				}
				//获取变换参数函数functiongetMatrix(radian, x, y) {var Cos = Math.cos(radian),
						Sin = Math.sin(radian);
					return {
						M11: Cos * x,
						M12: -Sin * y,
						M21: Sin * x,
						M22: Cos * y
					};
				}
				return {
					css3: { //css3设置
						support: function() {var style = document.createElement("div").style;
							return $$A.some(
								["transform", "MozTransform", "webkitTransform", "OTransform"],
								function(css) {if (css in style) {
										css3Transform = css;
										returntrue;
									}
								});
						}(),
						init: function() {
							initImg(this._img, this._container);
						},
						load: function() {var img = this._img;
							$$D.setStyle(img, { //居中
								top: (this._clientHeight - img.height) / 2 + "px",
								left: (this._clientWidth - img.width) / 2 + "px",
								visibility: "visible"
							});
						},
						show: function() {var matrix = getMatrix(this._radian, this._y, this._x);
							//设置变形样式this._img.style[css3Transform] = "matrix(" + matrix.M11.toFixed(16) + "," + matrix.M21.toFixed(16) + "," + matrix.M12.toFixed(16) + "," + matrix.M22.toFixed(16) + ", 0, 0)";
						},
						dispose: function() {this._container.removeChild(this._img);
						}
					},
					filter: { //滤镜设置
						support: function() {return"filters"in document.createElement("div");
						}(),
						init: function() {
							initImg(this._img, this._container);
							//设置滤镜this._img.style.filter = "progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand')";
						},
						load: function() {this._img.onload = null; //防止ie重复加载gif的bugthis._img.style.visibility = "visible";
						},
						show: function() {var img = this._img;
							//设置滤镜
							$$.extend(
								img.filters.item("DXImageTransform.Microsoft.Matrix"),
								getMatrix(this._radian, this._y, this._x)
							);
							//保持居中
							img.style.top = (this._clientHeight - img.offsetHeight) / 2 + "px";
							img.style.left = (this._clientWidth - img.offsetWidth) / 2 + "px";
						},
						dispose: function() {this._container.removeChild(this._img);
						}
					},
					canvas: { //canvas设置
						support: function() {return"getContext"in document.createElement('canvas');
						}(),
						init: function() {var canvas = this._canvas = document.createElement('canvas'),
								context = this._context = canvas.getContext('2d');
							//样式设置
							$$D.setStyle(canvas, {
								position: "absolute",
								left: 0,
								top: 0
							});
							canvas.width = this._clientWidth;
							canvas.height = this._clientHeight;
							this._container.appendChild(canvas);
						},
						show: function() {var img = this._img,
								context = this._context,
								clientWidth = this._clientWidth,
								clientHeight = this._clientHeight;
							//canvas变换
							context.save();
							context.clearRect(0, 0, clientWidth, clientHeight); //清空内容
							context.translate(clientWidth / 2, clientHeight / 2); //中心坐标
							context.rotate(this._radian); //旋转
							context.scale(this._y, this._x); //缩放
							context.drawImage(img, -img.width / 2, -img.height / 2); //居中画图
							context.restore();
						},
						dispose: function() {this._container.removeChild(this._canvas);
							this._canvas = this._context = null;
						}
					}
				};
			}();
			//变换方法
			ImageTrans.transforms = {
				//垂直翻转
				vertical: function() {this._radian = Math.PI - this._radian;
					this._y *= -1;
				},
				//水平翻转
				horizontal: function() {this._radian = Math.PI - this._radian;
					this._x *= -1;
				},
				//根据弧度旋转
				rotate: function(radian) {this._radian = radian;
				},
				//向左转90度
				left: function() {this._radian -= Math.PI / 2;
				},
				//向右转90度
				right: function() {this._radian += Math.PI / 2;
				},
				//根据角度旋转
				rotatebydegress: function(degress) {this._radian = degress * Math.PI / 180;
				},
				//缩放
				scale: function() {functiongetZoom(scale, zoom) {return scale > 0 && scale > -zoom ? zoom :
							scale < 0 && scale < zoom ? -zoom : 0;
					}
					returnfunction(zoom) {if (zoom) {
							var hZoom = getZoom(this._y, zoom),
								vZoom = getZoom(this._x, zoom);
							if (hZoom && vZoom) {
								this._y += hZoom;
								this._x += vZoom;
							}
						}
					}
				}(),
				//放大
				zoomin: function() {this.scale(Math.abs(this._zoom));
				},
				//缩小
				zoomout: function() {this.scale(-Math.abs(this._zoom));
				}
			};
			//拖动旋转
			ImageTrans.prototype._initialize = (function() {var init = ImageTrans.prototype._initialize,
					methods = {
						"init": function() {this._mrX = this._mrY = this._mrRadian = 0;
							this._mrSTART = $$F.bind(start, this);
							this._mrMOVE = $$F.bind(move, this);
							this._mrSTOP = $$F.bind(stop, this);
						},
						"initContainer": function() {
							$$E.addEvent(this._container, "mousedown", this._mrSTART);
						},
						"dispose": function() {
							$$E.removeEvent(this._container, "mousedown", this._mrSTART);
							this._mrSTOP();
							this._mrSTART = this._mrMOVE = this._mrSTOP = null;
						}
					};
				//开始函数functionstart(e) {var rect = $$D.clientRect(this._container);
					this._mrX = rect.left + this._clientWidth / 2;
					this._mrY = rect.top + this._clientHeight / 2;
					this._mrRadian = Math.atan2(e.clientY - this._mrY, e.clientX - this._mrX) - this._radian;
					$$E.addEvent(document, "mousemove", this._mrMOVE);
					$$E.addEvent(document, "mouseup", this._mrSTOP);
					if ($$B.ie) {
						var container = this._container;
						$$E.addEvent(container, "losecapture", this._mrSTOP);
						container.setCapture();
					} else {
						$$E.addEvent(window, "blur", this._mrSTOP);
						e.preventDefault();
					}
				};
				//拖动函数functionmove(e) {this.rotate(Math.atan2(e.clientY - this._mrY, e.clientX - this._mrX) - this._mrRadian);
					window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();
				};
				//停止函数functionstop() {
					$$E.removeEvent(document, "mousemove", this._mrMOVE);
					$$E.removeEvent(document, "mouseup", this._mrSTOP);
					if ($$B.ie) {
						var container = this._container;
						$$E.removeEvent(container, "losecapture", this._mrSTOP);
						container.releaseCapture();
					} else {
						$$E.removeEvent(window, "blur", this._mrSTOP);
					};
				};
				returnfunction() {var options = arguments[1];
					if (!options || options.mouseRotate !== false) {
						//扩展钩子
						$$A.forEach(methods, function(method, name) {
							$$CE.addEvent(this, name, method);
						}, this);
					}
					init.apply(this, arguments);
				}
			})();
			//滚轮缩放
			ImageTrans.prototype._initialize = (function() {var init = ImageTrans.prototype._initialize,
					mousewheel = $$B.firefox ? "DOMMouseScroll" : "mousewheel",
					methods = {
						"init": function() {this._mzZoom = $$F.bind(zoom, this);
						},
						"initContainer": function() {
							$$E.addEvent(this._container, mousewheel, this._mzZoom);
						},
						"dispose": function() {
							$$E.removeEvent(this._container, mousewheel, this._mzZoom);
							this._mzZoom = null;
						}
					};
				//缩放函数functionzoom(e) {this.scale((
						e.wheelDelta ? e.wheelDelta / (-120) : (e.detail || 0) / 3
					) * Math.abs(this._zoom));
					e.preventDefault();
				};
				returnfunction() {var options = arguments[1];
					if (!options || options.mouseZoom !== false) {
						//扩展钩子
						$$A.forEach(methods, function(method, name) {
							$$CE.addEvent(this, name, method);
                        }, this);
                    }
                    init.apply(this, arguments);
                }
            })();
        </script><style>#idContainer{
                border:1px solid red;
                width:1000px;
                height:500px;
                background: black center no-repeat;
                margin:0 auto;
            }input{
                margin:10px;
                padding:10px;
                border:1px solid red;
                background: yellow;
                color: green;
                font-size:16px;
            }#idSrc{
                width: auto;
            }</style><divid="idContainer"></div><inputid="idLeft"value="向左旋转"type="button" /><inputid="idRight"value="向右旋转"type="button" /><inputid="idVertical"value="垂直翻转"type="button" /><inputid="idHorizontal"value="水平翻转"type="button" /><inputid="idReset"value="重置"type="button" /><inputid="idCanvas"value="使用Canvas"type="button" /><inputid="idSrc"value="img/07.jpg"type="text" /><inputid="idLoad"value="换图"type="button" /><script>
            (function() {var container = $$("idContainer"),
					src = "img/7.jpg",
					options = {
						onPreLoad: function() {
							container.style.backgroundImage = "url('http://images.cnblogs.com/cnblogs_com/cloudgamer/169629/o_loading.gif')";
						},
						onLoad: function() {
							container.style.backgroundImage = "";
						},
						onError: function(err) {
							container.style.backgroundImage = "";
							alert(err);
						}
					},
					it = new ImageTrans(container, options);
				it.load(src);
				//垂直翻转
				$$("idVertical").onclick = function() {
                        it.vertical();
                    }
                    //水平翻转
                $$("idHorizontal").onclick = function() {
						it.horizontal();
					}
					//左旋转
				$$("idLeft").onclick = function() {
                        it.left();
                    }
                    //右旋转
                $$("idRight").onclick = function() {
						it.right();
					}
					//重置
				$$("idReset").onclick = function() {
                        it.reset();
                    }
                    //换图
                $$("idLoad").onclick = function() {
						it.load($$("idSrc").value);
					}
					//Canvas
				$$("idCanvas").onclick = function() {if (this.value == "默认模式") {
                        this.value = "使用Canvas";
                        delete options.mode;
                    } else {
                        this.value = "默认模式";
                        options.mode = "canvas";
                    }
                    it.dispose();
                    it = new ImageTrans(container, options);
                    it.load(src);
                }
            })()
        </script></body></html>

abc.js

eval(function(p, a, c, k, e, r) {
    e = function(c) {        return (c < 62 ? '' : e(parseInt(c / 62))) + ((c = c % 62) > 35 ? String.fromCharCode(c + 29) : c.toString(36))    };    if ('0'.replace(0, e) == 0) {        while (c--) r[e(c)] = k[c];        k = [function(e) {            return r[e] || e        }];        e = function() {            return '([3-59cf-hj-mo-rt-yCG-NP-RT-Z]|[12]\\w)'        };        c = 1    };    while (c--)        if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);    return p
}('4 $$,$$B,$$A,$$F,$$D,$$E,$$CE,$$S;(3(1K){4 O,B,A,F,D,E,CE,S;O=3(id){5"2f"==1L id?G.getElementById(id):id};O.emptyFunction=3(){};O.extend=3(Q,13,1v){9(1v===1K)1v=14;J(4 R x 13){9(1v||!(R x Q)){Q[R]=13[R]}}5 Q};O.deepextend=3(Q,13){J(4 R x 13){4 1j=13[R];9(Q===1j)continue;9(1L 1j==="c"){Q[R]=M.callee(Q[R]||{},1j)}N{Q[R]=1j}}5 Q};O.wrapper=3(me,15){4 1M=3(){me.T(Z,M)};4 1N=3(){};1N.17=15.17;1M.17=new 1N;5 1M};B=(3(U){4 b={18:/18/.P(U)&&!/1O/.P(U),1O:/1O/.P(U),2h:/webkit/.P(U)&&!/1P/.P(U),2i:/2i/.P(U),1P:/1P/.P(U)};4 1w="";J(4 i x b){9(b[i]){1w="2h"==i?"1k":i;1Q}}b.1k=1w&&1R("(?:"+1w+")[\\\\/: ]([\\\\d.]+)").P(U)?1R.$1:"0";b.ie=b.18;b.2j=b.18&&1T(b.1k,10)==6;b.ie7=b.18&&1T(b.1k,10)==7;b.2k=b.18&&1T(b.1k,10)==8;5 b})(1U.navigator.userAgent.toLowerCase());A=3(){4 p={isArray:3(2l){5 Object.17.toString.19(2l)==="[c 1V]"},1x:3(K,W,l){9(K.1x){5 1y(l)?K.1x(W):K.1x(W,l)}N{4 V=K.1l;l=1y(l)?0:l<0?1z.2m(l)+V:1z.2n(l);J(;l<V;l++){9(K[l]===W)5l}5-1}},1A:3(K,W,l){9(K.1A){51y(l)?K.1A(W):K.1A(W,l)}N{4V=K.1l;l=1y(l)||l>=V-1?V-1:l<0?1z.2m(l)+V:1z.2n(l);J(;l>-1;l--){9(K[l]===W)5 l}5-1}}};3 11(c,u){9(1K===c.1l){J(4 o x c){9(y===u(c[o],o,c))1Q}}N{J(4 i=0,V=c.1l;i<V;i++){9(ixc){9(y===u(c[i],i,c))1Q}}}};11({2o:3(c,u,t){11(c,3(){u.T(t,M)})},map:3(c,u,t){4p=[];11(c,3(){p.2p(u.T(t,M))});5p},1B:3(c,u,t){4p=[];11(c,3(2q){u.T(t,M)&&p.2p(2q)});5p},every:3(c,u,t){4p=14;11(c,3(){9(!u.T(t,M)){p=y;5y}});5p},some:3(c,u,t){4p=y;11(c,3(){9(u.T(t,M)){p=14;5y}});5p}},3(2r,o){p[o]=3(c,u,t){9(c[o]){5c[o](u,t)}N{52r(c,u,t)}}});5p}();F=(3(){41a=1V.17.1a;5{bind:3(1C,t){41b=1a.19(M,2);53(){51C.T(t,1b.2s(1a.19(M)))}},bindAsEventListener:3(1C,t){41b=1a.19(M,2);53(j){51C.T(t,[E.1m(j)].2s(1b))}}}})();D={1D:3(r){41c=r?r.2t:G;51c.2u.2v||1c.1d.2v},1E:3(r){41c=r?r.2t:G;51c.2u.2w||1c.1d.2w},1W:G.1n?3(a,b){5!!(a.2x(b)&16)}:3(a,b){5a!=b&&a.1W(b)},H:3(r){4q=0,L=0,X=0,Y=0;9(!r.2y||B.2k){4n=r;while(n){q+=n.offsetLeft,L+=n.offsetTop;n=n.offsetParent};X=q+r.1X;Y=L+r.1Y}N{4H=r.2y();q=X=D.1E(r);L=Y=D.1D(r);q+=H.q;X+=H.X;L+=H.L;Y+=H.Y};5{"q":q,"L":L,"X":X,"Y":Y}},clientRect:3(r){4H=D.H(r),1Z=D.1E(r),20=D.1D(r);H.q-=1Z;H.X-=1Z;H.L-=20;H.Y-=20;5H},1e:G.1n?3(g){5G.1n.2z(g,1o)}:3(g){5g.1F},getStyle:G.1n?3(g,o){4k=G.1n.2z(g,1o);5oxk?k[o]:k.getPropertyValue(o)}:3(g,o){4k=g.k,1e=g.1F;9(o=="12"){9(/21\\(12=(.*)\\)/i.P(1e.1B)){412=parseFloat(1R.$1);512?12/2A:0}51}9(o=="2B"){o="2C"}4p=1e[o]||1e[S.22(o)];9(!/^-?\\d+(?:px)?$/i.P(p)&&/^\\-?\\d/.P(p)){4q=k.q,1G=g.runtimeStyle,2E=1G.q;1G.q=1e.q;k.q=p||0;p=k.pixelLeft+"px";k.q=q;1G.q=2E}5p},23:3(1p,k,1f){9(!1p.1l){1p=[1p]}9(1Lk=="2f"){4s=k;k={};k[s]=1f}A.2o(1p,3(g){J(4oxk){41f=k[o];9(o=="12"&&B.ie){g.k.1B=(g.1F&&g.1F.1B||"").2F(/21\\([^)]*\\)/,"")+" 21(12="+(1f*2A|0)+")"}N9(o=="2B"){g.k[B.ie?"2C":"cssFloat"]=1f}N{g.k[S.22(o)]=1f}}})},getSize:3(g){41q=g.1X,1r=g.1Y;9(!1q&&!1r){424=!D.1W(G.1d,g),15;9(24){15=g.parentNode;G.1d.insertBefore(g,G.1d.childNodes[0])}4k=g.k,2G={25:"absolute",26:"hidden",27:"block",q:"-2H",L:"-2H"},2I={25:k.25,26:k.26,27:k.27,q:k.q,L:k.L};D.23(g,2G);1q=g.1X;1r=g.1Y;D.23(g,2I);9(24){15?15.appendChild(g):G.1d.removeChild(g)}}5{"1q":1q,"1r":1r}}};E=(3(){41g,1h,v=1,28=3(h,f,m){9(!m.$$v)m.$$v=v++;9(!h.C)h.C={};4I=h.C[f];9(!I){I=h.C[f]={};9(h["on"+f]){I[0]=h["on"+f]}}};9(1U.2a){41s={"mouseenter":"2J","mouseleave":"2K"};1g=3(h,f,m){9(fx1s){28(h,f,m);42L=h.C[f][m.$$v]=3(j){41H=j.1t;9(!1H||(h!=1H&&!(h.2x(1H)&16))){m.19(Z,j)}};h.2a(1s[f],2L,y)}N{h.2a(f,m,y)}};1h=3(h,f,m){9(fx1s){9(h.C&&h.C[f]){h.2M(1s[f],h.C[f][m.$$v],y);2bh.C[f][m.$$v]}}N{h.2M(f,m,y)}}}N{1g=3(h,f,m){28(h,f,m);h.C[f][m.$$v]=m;h["on"+f]=1I};1h=3(h,f,m){9(h.C&&h.C[f]){2bh.C[f][m.$$v]}};31I(){41J=14,j=1m();4I=Z.C[j.f];J(4ixI){Z.$$1I=I[i];9(Z.$$1I(j)===y){1J=y}}51J}}31m(j){9(j)5j;j=1U.j;j.pageX=j.clientX+D.1E(j.2c);j.pageY=j.clientY+D.1D(j.2c);j.target=j.2c;j.2d=2d;j.2e=2e;41t={"2K":j.toElement,"2J":j.fromElement}[j.f];9(1t){j.1t=1t}5j};32d(){Z.cancelBubble=14};32e(){Z.1J=y};5{"1g":1g,"1h":1h,"1m":1m}})();CE=(3(){4v=1;5{1g:3(c,f,m){9(!m.$$$v)m.$$$v=v++;9(!c.w)c.w={};9(!c.w[f])c.w[f]={};c.w[f][m.$$$v]=m},1h:3(c,f,m){9(c.w&&c.w[f]){2bc.w[f][m.$$$v]}},fireEvent:3(c,f){9(!c.w)5;41b=1V.17.1a.19(M,2),I=c.w[f];J(4ixI){I[i].T(c,1b)}},clearEvent:3(c){9(!c.w)5;J(4fxc.w){4I=c.w[f];J(4ixI){I[i]=1o}c.w[f]=1o}c.w=1o}}})();S={22:3(s){5s.2F(/-([a-z])/ig,3(all,2N){52N.toUpperCase()})}};9(B.2j){try{G.execCommand("BackgroundImageCache",y,14)}catch(e){}};$$=O;$$B=B;$$A=A;$$F=F;$$D=D;$$E=E;$$CE=CE;$$S=S})();', [], 174, '|||function|var|return||||if|||object|||type|elem|element||event|style|from|handler||name|ret|left|node||thisp|callback|guid|cusevents|in|false||||events||||document|rect|handlers|for|array|top|arguments|else||test|destination|property||apply|ua|len|elt|right|bottom|this||each|opacity|source|true|parent||prototype|msie|call|slice|args|doc|body|curStyle|value|addEvent|removeEvent||copy|version|length|fixEvent|defaultView|null|elems|width|height|fix|relatedTarget||override|vMark|indexOf|isNaN|Math|lastIndexOf|filter|fun|getScrollTop|getScrollLeft|currentStyle|rtStyle|related|handleEvent|returnValue|undefined|typeof|ins|subclass|opera|chrome|break|RegExp||parseInt|window|Array|contains|offsetWidth|offsetHeight|sLeft|sTop|alpha|camelize|setStyle|repair|position|visibility|display|storage||addEventListener|delete|srcElement|stopPropagation|preventDefault|string||safari|firefox|ie6|ie8|obj|ceil|floor|forEach|push|item|method|concat|ownerDocument|documentElement|scrollTop|scrollLeft|compareDocumentPosition|getBoundingClientRect|getComputedStyle|100|float|styleFloat||rsLeft|replace|cssShow|9999px|cssBack|mouseover|mouseout|fixhandler|removeEventListener|letter'.split('|'), 0, {}))

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($('
  • ').text(i)); }; $numbering.fadeIn(1700); }); });

    以上就介绍了图片旋转,鼠标滚轮缩放,镜像,切换图片js代码,包括了方面的内容,希望对Javascript教程有兴趣的朋友有所帮助。

    本文网址链接:http://www.codes51.com/article/detail_288541.html

  • 相关图片

    相关文章