首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

JQuery动态生成一个居间显示的提升DIV

2012-09-19 
JQuery动态生成一个居中显示的提升DIV代码:var sss sss + div idmess_lysss + /div$(

JQuery动态生成一个居中显示的提升DIV
代码:

var sss = "";sss += "<div id='mess_ly'>";sss += "</div>";$("#rightPane").after(sss); //前面的id是随便给一个都可以$('#mess_ly').css({   position:'absolute',   'z-index':99999,width:'349px',height:'123px','background-image':"url('cist_images/mess_ly.png')",//设置背景图片   left: ($(window).width() - $('.className').outerWidth())/2-200, //位置关键   top: ($(window).height() - $('.className').outerHeight())/2});setTimeout(function(){$("#mess_ly").fadeOut(1000)},5000);//自动消失
1 楼 xx_521 2011-10-22   $('.className')这个是哪个? 2 楼 xx_521 2011-10-22   不显示哇,怎么回事啊 3 楼 luo_yong_men 2011-10-24   xx_521 写道$('.className')这个是哪个?
那个不要都可以的,这个是我从项目中直接粘贴出来的代码..
是调整位置的 ,直接在后面加减一些数字就可以调整位置了

这个 $("#rightPane") id一定要存在哦

热点排行