-
Notifications
You must be signed in to change notification settings - Fork 0
/
voltar-top-abalateral.html
88 lines (77 loc) · 2.05 KB
/
voltar-top-abalateral.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>gotop aba</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($){
$("#back-to-top").click(function(){
$("html, body").animate({ scrollTop: 0 }, 600);
return false;
});
$(window).scroll(function(){
if ($(this).scrollTop() > 200) {
$('#back-to-top').addClass("aparece");
} else {
$('#back-to-top').removeClass("aparece");
}
});
});
</script>
<style type="text/css">
#back-to-top{
position:fixed;
bottom:100px;
right:0;
height:20px;
padding:5px;
line-height:20px;
width:80px;
background:white;
border-radius:5px 0 0 5px;
cursor:pointer;
margin-right:-85px;
-webkit-box-shadow:0 0 0 1px rgba(0,0,0,0.17),0 3px 2px rgba(0,0,0,0.09);
box-shadow:0 0 0 1px rgba(0,0,0,0.17),0 3px 2px rgba(0,0,0,0.09);
-webkit-transition:margin .3s cubic-bezier(0.175,0.885,0.32,1.275);
-moz-transition:margin .3s cubic-bezier(0.175,0.885,0.32,1.275);
-o-transition:margin .3s cubic-bezier(0.175,0.885,0.32,1.275);
transition:margin .3s cubic-bezier(0.175,0.885,0.32,1.275)
}
#back-to-top.aparece{
margin-right:-60px
}
#back-to-top:hover{
margin-right:-20px
}
#back-to-top p{
margin-left:30px;
margin-top: 0px;
}
#back-to-top .icon{
width:20px;
height:20px;
display:block;
float:left;
margin-right:8px;
border-radius:3px;
background-image:url("http://static.tumblr.com/hugxd2w/YUsma9g5b/effector-sprite.png");
background-repeat:no-repeat;
background-color: #f55b2c;
background-position:4px -120px
}
#back-to-top:hover .icon{
background-color:#2f3030
}
.conteudo{ height:1600px}
</style>
</head>
<body>
<div id="back-to-top"><a href="javascript:void(0)">
<span class="icon"></span>
<p>Topo</p>
</a></div>
<div class="conteudo"></div>
</body>
</html>