javascript双向放大缩小广告代码
双向放大缩小广告代码-我们
html {
overflow: hidden;
}
body {
background: #222;
width: 100%;
height: 100%;
cursor: crosshair;
}
.spanSlide {
position: absolute;
background: #000;
font-size: 1px;
overflow: hidden;
}
.imgSlide {
position: absolute;
left: 5%;
top: 5%;
width: 90%;
height: 90%;
overflow: hidden;
}
.txtSlide {
position: absolute;
top: 5%;
left: 50px;
width:100%;
color:#FFF;
font-family: arial, helvetica, verdana, sans-serif;
font-weight: bold;
font-size:96px;
letter-spacing:12px;
filter: alpha(opacity=70);
-moz-opacity:0.7;
opacity:0.7;
}
var ym=0;
var ny=0;
createElement = function(container, type, param){
o=document.createElement(type);
for(var i in param)o[i]=param[i];
container.appendChild(o);
return o;
}
mooz = {
O:[],
/////////
mult:6,
nbI:5,
/////////
rwh:0,
imgsrc:0,
W:0,
H:0,
Xoom:function(N){
this.o = createElement(document.getElementById("screen"), "span", {
'className':'spanSlide'
});
img = createElement(this.o, "img", {
'className':"imgSlide",
'src':mooz.imgsrc[N%mooz.imgsrc.length].src
});
spa = createElement(this.o, "span", {
'className':"imgSlide"
});
txt = createElement(spa, "span", {
'className':"txtSlide",
'innerHTML':mooz.imgsrc[N%mooz.imgsrc.length].title
});
this.N = 10000+N;
},
mainloop:function(){
with(this){
for(i=0; iny)ny=ym/2;
}
window.onload = function(){
ym = ny+50;
mooz.oigres();
}
Loading...
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]