文章目录[隐藏]
引入文件
要实现返回顶部的特效,我们要引入zzsc.css,popwin.js,jQuery.js.点击下面的链接下载所以文件。
百度网盘下载
1、css引入方法
把以下css代码直接复制到你的主题的style.css文件的最后,这样你就不需要单独再引入zzsc.css文件了。
/*
*goto top css begin
*/
ul,ol {
list-style:none
}
a {
text-decoration:none
}
a:hover {
text-decoration:underline
}
#moquu_top,#moquu_wxin,#moquu_wshare,#moquu_wmaps {
z-index:999;
width:50px;
height:50px;
right:10px;
position:fixed;
cursor:pointer;
_position:absolute;
_bottom:auto;
_top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)))
}
#moquu_wxin {
top:660px;
_margin-top:660px
}
#moquu_wxin a {
background:url(../images/sbtn.png) 0 -0px;
right:0;
float:left;
width:50px;
height:50px;
text-indent:-9999px
}
#moquu_wxin a:hover {
background:url(../images/sbtn.png) -50px -0px
}
#moquu_wshare {
top:712px;
_margin-top:712px
}
#moquu_wshare a {
background:url(../images/sbtn.png) 0 -50px;
width:50px;
height:50px;
right:0;
float:left;
text-indent:-9999px
}
#moquu_wshare a:hover {
background:url(../images/sbtn.png) -50px -50px
}
#moquu_wmaps {
top:764px;
_margin-top:764px
}
#moquu_wmaps a {
background:url(../images/sbtn.png) 0 -150px;
width:50px;
height:50px;
right:0;
float:left;
text-indent:-9999px
}
#moquu_wmaps a:hover {
background:url(../images/sbtn.png) -50px -150px
}
#moquu_top {
top:816px;
_margin-top:816px;
background:url(../images/sbtn.png) 0 -101px;
width:50px;
height:50px
}
#moquu_top:hover {
background:url(../images/sbtn.png) -50px -101px
}
.moquu_wxin,.moquu_wshare {
position:relative;
z-index:2
}
.moquu_wxin a:hover .moquu_wxinh,.moquu_wshare a:hover .moquu_wshareh {
display:block
}
.moquu_wxin .moquu_wxinh {
position:absolute;
display:none;
left:-280px;
top:-200px;
width:275px;
height:355px;
background:url(../images/moquu_ico.png) -1px -482px no-repeat
}
.moquu_wshare .moquu_wshareh {
position:absolute;
display:none;
left:-280px;
top:-200px;
width:275px;
height:360px;
background:url(../images/moquu_wshare.png) no-repeat
}
2、popwin.js核心文件的引入
打开你主题文件footer.php找到最下面