这篇文章主要为大家详细介绍了网页底部手机(wap)端网页底部漂浮固定悬浮广告带轮播特效代码,具有一定的参考价值,感兴趣的小伙伴们可以参考一下,有需要的朋友可以收藏方便以后借鉴。
这个代码是帮用户做的,感觉还不错因此织梦模板网分享出来给大家:
// 作者:www.ke361.com // 网址:http://www.ke361.com // 日期:2019-11-2 // QQ:71260368 // code:网页底部悬浮广告代码,带单独关闭 var fc_fw="800px"; //广告宽度,单位px,如自适应宽度就改为100%; var fc_fh="100px"; //广告高度,单位px var fc_fsrc=['http://www.ke361.com/gg/ad1.png','http://www.1357vip.com/ad/ad2.png','http://www.ke361.com/gg/1300ad.png'];//图片地址[个数要和链接个数对应] var fc_fl=['http://www.ke361.com/','http://www.tao2t.com/','http://www.1357vip.com/'];//图片链接地址[个数要和图片地址个数对应] //样式 document.writeln(""); document.writeln(""); document.writeln(""); document.writeln(""); for(var k = 0; k < fc_fsrc.length; k++){ document.writeln(""); } document.writeln(""); document.writeln(""); for(var h = 0; h < fc_fsrc.length; h++){ if(h==0){ document.writeln("1"); }else{ document.writeln(""+(h+1)+""); } } document.writeln(""); document.writeln("关闭X"); document.writeln(""); document.writeln(""); var f_skyf = document.getElementById('f_skyf'),f_str_f = document.getElementById('f_str_f'), flist_f = document.getElementById('flist_f').getElementsByTagName('li'),index_f = 0,time_f = null; // 若果有在等待的定时器,则清掉 if(time_f){ clearInterval(time_f); time_f = null; } // 自动切换 time_f = setInterval(autoPlayfoot, 2000); // 定义并调用自动播放函数 function autoPlayfoot(){ index_f++; if(index_f >= flist_f.length){ index_f = 0; } changeImg(index_f); } // 定义图片切换函数 function changeImg(curindex_f){ for(var j = 0; j < flist_f.length; j++){ flist_f[j].className = ""; //f_skyf.style.top=0; } // 改变当前显示索引 flist_f[curindex_f].className = "on"; f_str_f.style.marginTop = -fc_fh.substring(0,fc_fh.length-2)*curindex_f + "px"; //高度 index_f = curindex_f; } // 鼠标划过整个容器时停止自动播放 f_skyf.onmouseover = function(){ clearInterval(time_f); } // 鼠标离开整个容器时继续播放至下一张 f_skyf.onmouseout = function(){ time_f = setInterval(autoPlayfoot, 2000); } // 遍历所有数字导航实现划过切换至对应的图片 for (var i = 0; i < flist_f.length; i++){ flist_f[i].id = i; flist_f[i].onmouseover = function() { clearInterval(time_f); changeImg(this.id); } } var btn_closef = document.getElementById("btn_closef"); var f_div_f = document.getElementById("fc_foot"); btn_closef.onclick = function(){ if(f_div_f){ f_div_f.style.display = "none"; } }
以上就是网页底部手机(wap)端网页底部漂浮固定悬浮广告带轮播特效代码的全部内容,希望对大家的学习和解决疑问有所帮助,也希望大家多多支持网。
帝国CMS后台发布文章在文章列表中标题字数被截取如何恢复
最近有用户总在求助帝国CMS的相关问题,织梦模板小编就挑选出比较有代表性的几个问题记录下来分享给有需求的朋友。其他一个问题是这样的,用户在后台发布文章的时候,当文章标