在百度看了很多“返回顶部”或者“回到顶部”的代码,很多都动用了JS代码,导致很多新手朋友实践起来有些难度。

下面本站为您提供的这个“ECSHOP返回顶部的代码”,是用纯CSS实现的,实现起来超级简单。

看到了吧,这个“回顶部”的小按钮永远漂浮在窗口的右下角。

实现方法:


修改  themes/模板文件夹/library/page_footer.lbi 文件

在最末尾加入以下代码即可

 
<style>
.to_top{width:20px;height:59px;right:40px;position:fixed;bottom:50px;_position:absolute;_top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-134))}
</style>
<a href="#" class="to_top" title="返回顶部"><img src="/uploads/allimg/120928/1126341C8-0.png" width="20" height="59" /></a> 
转载请注明:文章转载自蓝正网络 郑州网站建站专家http://www.zzsas.cn