Menu
Code:
<script type="text/javascript" src="http://yourjavascript.com/5601829183/totop.js"></script>
<style type='text/css'>
#totop,#totop2{
position: fixed;right: -30px;bottom: -80px;
width: 149px;height: 249px;overflow: hidden;
cursor: pointer;display: none;
background: url(http://i.imgur.com/XkYmgD0.png) no-repeat 0px 0;
z-index: 9999;
}
#totop2{
background: url(http://i.imgur.com/XkYmgD0.png) no-repeat -149px 0;
}
</style>
Code:
https://brivium.com/
Code:
<script>
jQuery(document).ready(function() {
var offset = 220;
var duration = 500;
jQuery(window).scroll(function() {
if (jQuery(this).scrollTop() > offset) {
jQuery('.back-to-top').fadeIn(duration);
} else {
jQuery('.back-to-top').fadeOut(duration);
}
});
jQuery('.back-to-top').click(function(event) {
event.preventDefault();
jQuery('html, body').animate({scrollTop: 0}, duration);
return false;
})
});
</script>
<style>
div#page {
max-width: 900px;
margin-left: auto;
margin-right: auto;
padding: 20px;
}
.back-to-top {
position: fixed;
right: 10px;
bottom: 30px;
display: none;
width: 50px;
height: 50px;
background-color: rgba(68,68,68,0.5);
color: white;
border-radius: 100%;
z-index: 9998;
text-align: center;
transition: background 0.6s;
}
.back-to-top:hover {
background-color: rgba(135, 135, 135, 0.50);
text-decoration: none;
}
.back-to-top i {
transition: all .5s;
font-size: 35px;
position: absolute;
left: 50%;
top: 45%;
-webkit-transform: rotate(-45deg) translateY(-50%);
-ms-transform: rotate(-45deg) translateY(-50%);
transform: rotate(-45deg) translateY(-50%);
}
.back-to-top i:hover {
font-size: 60px;
color: #ff7800;
text-shadow: 0 0 2px white,0 0 2px white,0 0 2px white,0 0 2px white,0 0 2px white;
transition: all .5s;
}
a.back-to-top:hover {
background: none!Important;
}
</style>
<a class="back-to-top" href="#"><i class="fa fa-plane" aria-hidden="true"></i></a>
Code:
<a href="#" id="go_top"></a>
<script>
(funcion(){
$('#go_top').click(function(){
$('body,html').animate({scrollTop:0},400);
return false;
})
})(jQuery)
$(window).scroll(function(){
if( $(window).scrollTop() == 0 ) {
$('#go_top').stop(false,true).fadeOut(600);
}else{
$('#go_top').stop(false,true).fadeIn(600);
}
});
</script>
<style>
#go_top{
display:block;
width:31px;
height:31px;
position:fixed;
background-color:#2ccaae;
bottom:15px;
right:15px;
}
/*-- tạo mũi tên --*/
#go_top:before{
content:"";
position:Absolute;
width:0;
height:0;
border:11px solid transparent;
border-bottom:11px solid white;
left:5px;
top:-8px;
}
#go_top:after{
content:"";
position:Absolute;
width:10px;
height:17px;
background-color:white;
left:11px;
top:14px;
}
</style>
|
|