亲接我一个海岛奇兵18本的号。

白云 白云
回答
  • 会飞的猪 会飞的猪

    可关闭,可最小化,带点淡入淡出效果的右下角弹出广告;参考如下:
    右下角广告代码
    msg_win{border:1px solid#a67901;background:#eaeaea;width:300px;position:absolute;right:2;margin:0px;d**play:none;overflow:hidden;z-index:99;}
    msg_win.icos{position:absolute;top:2px;top:0px;right:2px;z-index:9;}
    icos a{float:left;color:#833b02;margin:1px;text-align:center;text-decoration:none;font-family:webdings;}
    icos a:hover{color:#fff;}
    msg_title{background:#fecd00;border-bottom:1px solid#a67901;border-top:1px solid#fff;border-left:1px solid#fff;color:#000;height:25px;line-height:25px;text-indent:5px;}
    msg_content{margin:2px;width:300px;height:200px;overflow:hidden;}
    top:490px;v**ibility:v**ible;opacity:1;a id="msg_min"title="最小化"href="j**ascript:void 0">_</a><a id="msg_close"title="关闭"href="j**ascript:void 0">×</a></div>
    广而告之:
    a href="http://www.baidu.com/" target="_blank"><img src="http:///ad_include/zhubajie300_270.gif" width="300" height="270" border="0"></a></div>
    var **={
    set:function(){/最小化与恢复状态切换
    var set=th**.minbtn.status=1?[0,1,'block',th**.char[0],'最小化']:[1,0,'none',th**.char[1],'恢复'];th**.minbtn.status=set[0];th**.win.style.borderbottomwidth=set[1];th**.content.style.d**play=set[2];th**.minbtn.innerhtml=set[3]
    th**.minbtn.title=set[4];th**.win.style.top=th**.gety().top;},
    close:function(){/关闭
    th**.win.style.d**play='none';window.onscroll=**;},
    setopacity:function(x){/设置透明度
    var v=x>=100?'':'alpha(opacity='+x+')';th**.win.style.v**ibility=x;ie有绝对或相对定位内容不随父透明度变化的bug
    th**.win.style.filter=v;th**.win.style.opacity=x/100;},
    show:function(){/渐显
    clearinterval(th**.timer2);var me=th**,fx=th**.fx(0,100,0.1),t=0;th**.timer2=setinterval(function(){
    t=fx();me.setopacity(t[0]);if(t[1]=0){clearinterval(me.timer2)}
    },10);},
    fx:function(a,b,c){/缓冲计算
    var cmath=math[(a-b)>0?floor":"ceil"],c=c|0.1;return function(){return[a+cmath((b-a)*c),a-b]}
    },
    gety:function(){/计算移动坐标
    var d=document,b=document.body,e=document.documentelement;var s=math.max(b.scrolltop,e.scrolltop);var h=backcompat/i.test(document.compatmode)?b.clientheight:e.clientheight;var h2=th**.win.offsetheight;return {foot:s+h+h2+2+'px',top:s+h-h2-2+'px'}
    },
    moveto:function(y){/移动动画
    clearinterval(th**.timer);var me=th**,a=parseint(th**.win.style.top)|0;var fx=th**.fx(a,parseint(y));var t=0;th**.timer=setinterval(function(){
    t=fx();me.win.style.top=t[0]+'px';if(t[1]=0){
    clearinterval(me.timer);me.bind();}
    },10);},
    bind:function(){/绑定窗口滚动条与大小变化**
    var me=th**,st,rt;window.onscroll=function(){
    cleartimeout(st);cleartimeout(me.timer2);me.setopacity(0);st=settimeout(function(){
    me.win.style.top=me.gety().top;me.show();},600);};window.onresize=function(){
    cleartimeout(rt);rt=settimeout(function(){me.win.style.top=me.gety().top},100);}
    },
    init:function(){/创建html
    function$(id){return document.getelementbyid(id)};th**.win=$('msg_win');var set={minbtn:'msg_min',closebtn:'msg_close',title:'msg_title',content:'msg_content'};for(var id in set){th**[id]=$(set[id])};var me=th**;th**.minbtn.onclick=function(){me.set();th**.blur()};th**.closebtn.onclick=function(){me.close()};th**.char=n**igator.useragent.tolowercase().indexof('firefox')+1?['_',':','×']:['0','2','r'];ff不支持webdings字体
    th**.minbtn.innerhtml=th**.char[0];th**.closebtn.innerhtml=th**.char[2];settimeout(function(){/初始化最先位置
    me.win.style.d**play='block';me.win.style.top=me.gety().foot;me.moveto(me.gety().top);},0);return th**;}
    };**.init();

类似问答
精品推荐

友情链接

友链互换QQ:

谷财 备案编号:蜀ICP备11019336号-3商务合作:235-677-2621

Copyright 2009-2020 Chengdu Sanzilewan Technology Co.,Ltd all rights reserve

抵制不良游戏 拒绝盗版游戏 注意自我保护 谨防受骗上当 适度游戏益脑 沉迷游戏伤身 合理安排时间 享受健康生活