Rất đẹp và lợi
Quên cái đề mô :
Vào overall_footer_begin thêm code sau vào cuối :
Tags: #top #nút #tự #làm
Được sửa bởi trandangduat ngày 8/29/2016, 20:52; sửa lần 1.
Quên cái đề mô :
Vào overall_footer_begin thêm code sau vào cuối :
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>
Tags: #top #nút #tự #làm
Được sửa bởi trandangduat ngày 8/29/2016, 20:52; sửa lần 1.