1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > JS下拉缓冲菜单示例代码【javascript】

JS下拉缓冲菜单示例代码【javascript】

时间:2023-06-01 08:30:27

相关推荐

JS下拉缓冲菜单示例代码【javascript】

web前端|js教程

JS下拉,缓冲菜单

web前端-js教程

sar函数源码,qq vscode,ubuntu自动挂载u盘,tomcat未启用管理控制台,sqlite 限制容量,济南手机网页设计公司,网上服务器租用,点击按钮进行验证插件,前端框架与flask,抖音爬虫变现,php内幕,国际seo,常州化龙巷网站favicon.ico,注册网页模版下载,shopex 模板修改,后台审核页面模板,dtcms网站管理系统,matlab遗传算法图像加密程序lzw

body,html,div,ul,li,span,img,a{

margin:0;

padding:0;

}

a{

text-decoration:none;

color:#000;

font-weight:bold;

width:150px;

display:inline-block;

text-align:center;

}

li{

list-style:none;

}

img{

width:0;

height:0;

outline:none;

}

#tab{

margin:200px 0 0 300px;

}

#tab li{

float:left;

width:150px;

height:50px;

line-height:50px;

position:relative;

margin-right:30px;

}

#tab img.map,#tab span.content{

position:absolute;

}

#tab span.content{

background:#333;

color:#FFF;

font-size:14px;

text-align:center;

height:0;

}

#tab img.map{

left:50%;

bottom:0;

}

JS下拉缓冲菜单_网页代码站()

路飞

草帽海贼团船长,特征是头戴草帽,天性乐观、热情、善良、天真、单纯。

索隆

草帽海贼团剑士,绿色头发,左耳戴三只黄色露珠耳环,绿色的肚兜,路痴。

娜美

精通气象学和航海术,擅长偷术、骗术、谈判及威胁恐吓,头脑聪明又机灵。

山治

草帽海贼团厨师,金发,有着卷曲眉毛,永远遮住半边脸的家伙,海贼中的绅士。

function kzxf_zoom(id)

{

this.initialize.apply(this, arguments)

}

数据整理 源码,vscode如何调试ts,ubuntu 音乐属性,Tomcat启动503,易语言查询sqlite缓慢,大众点评爬虫,php 浏览器信息,谷歌seo外推,彩票网站制作 平台,网页游戏整站,视频网404页面模板lzw

kzxf_zoom.prototype =

{

initialize : function()

servlet 源码包,vscode如何使得代码规范化,ubuntu cp mv,tomcat8 启动关闭,美女爬虫浏览,php网站做成exe,正规seo外包有哪些公司运营lzw

{

var _this = this;

this.wrapBox = document.getElementById(‘tab’);

this.oLi = this.wrapBox.getElementsByTagName(‘li’);

this.aImg = this.wrapBox.getElementsByTagName(‘img’);

this.content = this.wrapBox.getElementsByTagName(‘span’);

for(var i=0;i<this.oLi.length;i++)

{

(function(i){

_this.oLi[i].onmouseover = function()

{

_this.jump(_this.aImg[i], _this.content[i]);

};

_this.oLi[i].onmouseout = function()

{

_this.hidden(_this.aImg[i], _this.content[i]);

};

})(i)

}

},

jump : function(obj1, obj2)

{

var _this = this;

_this.animation(obj1, {height:130, width:160, marginLeft:-78, marginTop:-128},function(){

_this.animation(obj1, {height:115, width:140, marginLeft:-70, marginTop:-115}, function(){

_this.animation(obj1, {height:120, width:150, marginLeft:-75, marginTop:-120})

})

});

_this.animation(obj2, {height:200});

},

hidden : function(obj1, obj2)

{

var _this = this;

_this.animation(obj1, {width:0, height:0, marginLeft:0, marginTop:0});

_this.animation(obj2, {height:0});

},

animation : function(obj, oAttr, fnCallBack)

{

var _this = this;

clearInterval(obj.timer);

obj.timer = setInterval(function()

{

var bStop = true;

for(proper in oAttr)

{

var iCur = parseFloat(_this.css(obj, proper));

proper == ‘opacity’ && (iCur = parseInt(iCur.toFixed(2) * 100));

var iSpeed = (oAttr[proper] – iCur) / 5;

iSpeed = iSpeed > 0 ? Math.ceil(iSpeed) : Math.floor(iSpeed);

if(iCur != oAttr[proper])

{

bStop = false;

_this.css(obj, proper, iCur + iSpeed);

}

}

if(bStop)

{

clearInterval(obj.timer);

fnCallBack && fnCallBack.apply(_this, arguments);

}

},20);

},

css : function(obj, attr, value)

{

if(arguments.length == 2)

{

return obj.currentStyle ? obj.currentStyle[attr] : getComputedStyle(obj, null)[attr]

}

if(arguments.length == 3)

{

switch(attr)

{

case ‘width’ :

case ‘height’ :

case ‘top’ :

case ‘bottom’ :

case ‘left’ :

case ‘marginLeft’:

case ‘marginTop’:

obj.style[attr] = value + ‘px’;

break;

case ‘opacity’ :

obj.style.filter = ‘alpha(opacity = ‘+value+’ )’;

obj.style.opacity = value / 100;

break;

default :

obj.style[attr] = value;

break;

}

}

}

};

window.onload = function()

{

new kzxf_zoom(‘tab’)

};

http://user./1198772766

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。