手机(wap)网页底部固定悬浮广告带轮播特效代码
作者:admin发布时间:2021-10-15分类:收益展现浏览:评论:10
//作者网址日期2019-03-网页底部悬浮广告代码带单独关闭广告宽度,单位px,如自适应宽度就改为100%;广告高度,单位[,,图片地址[个数要和链接个数对应]varfc_fl[https://www.csdn.net/,https://www.csdn.net/,https://www.csdn.net///图片链接地址[个数要和图片地址个数对应]//样式document.writeln(styletype\text/css\document.writeln(*{margin:0;padding:0;list-style:none;}document.writeln(.fc_foot{width:100%;position:fixed;bottom:0px;z-index_f:9999;}document.writeln(.f_skyf{width:fc_fwheight:fc_fhmargin:0pxauto;position:relative;z-index_f:9000;overflow:hidden;}document.writeln(.f_skyful{position:absolute;left:0;top:0;width:fc_fwheight:fc_fh}document.writeln(.f_skyfulli{width:fc_fwheight:fc_fh}document.writeln(.f_skyfol{position:absolute;right:5px;bottom:10px;}document.writeln(.f_skyfolli{width:15px;height:15px;line-height:15px;dispaly:inline-block;background:#ddd;border:1pxsolid#969591;border-radius:50%;color:#959490;float:left;margin-left:5px;font-size:10px;text-align:center;cursor:pointer;}document.writeln(.f_skyfulliimg{width:fc_fwheight:fc_fh}document.writeln(.f_skyfol.on{background:#8F9E9E;color:#fff;}document.writeln(.f_skyf.btn_closef{position:absolute;width:38px;text-align:center;height:16px;line-height:16px;border:1px#bcbcbcsolid;background-color:#d3d3d3;color:#666666;top:0;right:0;border-bottom-left-radius:6px;font-size:12px;filter:alpha(Opacity50);-moz-opacity:0.7;opacity:0.7;}document.writeln(/styledocument.writeln(divclass\fc_foot\id\fc_foot\document.writeln(divclass\f_skyf\id\f_skyf\document.writeln(ulid\f_str_f\for(vark0;kfc_fsrc.length;k){document.writeln(liahref\fc_fl[k]\target\_blank\imgsrc\fc_fsrc[k]\//a/li}document.writeln(/uldocument.writeln(olid\flist_f\for(varh0;hfc_fsrc.length;h){if(h0){document.writeln(liclass\on\1/li}else{document.writeln(li(h1)/li}}document.writeln(/oldocument.writeln(spanclass\btn_closef\id\btn_closef\关闭X/spandocument.writeln(/divdocument.writeln(/divvarf_skyfdocument.getElementById(f_skyf),f_str_fdocument.getElementById(f_str_f),flist_fdocument.getElementById(flist_f).getElementsByTagName(li),index_f0,time_fnull;//若果有在等待的定时器则清掉if(time_f){clearInterval(time_f);time_fnull;}//自动切换time_fsetInterval(autoPlayfoot,2000);//定义并调用自动播放函数functionautoPlayfoot(){index_fif(index_fflist_f.length){index_f0;}changeImg(index_f);}//定义图片切换函数functionchangeImg(curindex_f){for(varj0;jflist_f.length;j){flist_f[j].className//f_skyf.style.top}//改变当前显示索引flist_f[curindex_f].classNameonf_str_f.style.marginTop-fc_fh.substring(0,fc_fh.length-2)*curindex_fpx//高度index_fcurindex_f;}//鼠标划过整个容器时停止自动播放f_skyf.onmouseoverfunction(){clearInterval(time_f);}//鼠标离开整个容器时继续播放至下一张f_skyf.onmouseoutfunction(){time_fsetInterval(autoPlayfoot,2000);}//遍历所有数字导航实现划过切换至对应的图片for(vari0;iflist_f.length;i){flist_f[i].idi;flist_f[i].onmouseoverfunction(){clearInterval(time_f);changeImg(this.id);}}varbtn_closefdocument.getElementById(btn_closefvarf_div_fdocument.getElementById(fc_footbtn_closef.onclickfunction(){if(f_div_f){f_div_f.style.displaynone}}
相关推荐
你 发表评论:
欢迎- 收益展现排行
已有10位网友发表了看法: