广州传奇网络
地址:广州市天河区东圃大马路富华楼C座
电话:13808825895
QQ:1564443073
在百度或者ECSHOP论坛里,看了很多“返回顶部”或者“回到顶部”的代码,很多都动用了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="/uploadfile/upfile/2011/201134200.gif" width="20" height="59" /></a> |