运行代码 缩小
汉王
HTML代码
复制 格式化 注释 注释 清空
放大
AخA
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
3
<head>
4
<title>动画版的回到顶部和底部效果代码</title>
5
<meta http-equiv="content-type" content="text/html;charset=gb2312">
6
<style type="text/css">
7
body{padding:0px;margin:0px;}
8
#roll_top,#fall,#ct{position:relative;cursor:pointer;height:40px;width:15px;}
9
#roll_top{background:url(//ku.shouce.ren/files/images/201601/56a3214e24896.png) no-repeat;}
10
#fall{background:url(//ku.shouce.ren/files/images/201601/56a3214e24896.png) no-repeat 0 -80px;}
11
#ct{background:url(//ku.shouce.ren/files/images/201601/56a3214e24896.png) no-repeat 0 -40px;}
12
#roll{display:block;width:15px;margin-right:-508px;position:fixed;right:50%;top:50%;_margin-right:-507px;_position:absolute;_margin-top:300px;_top:expression(eval(document.documentElement.scrollTop));}
13
</style>
14
<!--[if IE]>
15
<style type="text/css">
CSS代码
复制 格式化 注释 注释 颜色 清空
放大
CSS代码...
x
 
1
JS代码
复制 格式化 注释 注释 清空
放大
JS代码...
xxxxxxxxxx
1
 
1
名称
动画版的回到顶部和底部效果代码
分类
网站常用
描述
动画版的回到顶部和底部效果代码,也算是比较常见的一款网页特效了,像淘宝网就有这种效果,使用了jQuery插件,加入了动画效果。
收藏