i found this kinda styled anchor name
in this website http://maplestory.nexon.net/
can anyone know how to do this? What is that called?
i found this kinda styled anchor name
in this website http://maplestory.nexon.net/
can anyone know how to do this? What is that called?
This is a sample code, try like this
html
<div id="mydiv"></div>
<a href="#" id="backtotop" ></a>
<div id="mydiv1"></div>
script
$(window).scroll(function(){
$('#backtotop').stop().animate({ top: $(window).scrollTop()+100 }, 500);
});
css
#mydiv
{
background-color:red;
height:1000px;
width:300px;
}
#backtotop {
z-index: 81;
position: absolute;
left: 300px;
width: 64px;
height: 93px;
background: url(http://nxcache.nexon.net/maplestory/img/bg/bg-backtotop.png) 0 0 no-repeat;
}
and here is the demo, DEmo
One more example of such feature implementation:
var $toTop = $('#to-top').click(function() {
$('body').animate({
scrollTop: 0
});
});
$(window).scroll(function() {
$toTop.toggle($(window).scrollTop() > 100);
})
.trigger('scroll');
its css try this code
{
z-index: 81;
display: none;
position: absolute;
right: -53px;
width: 64px;
height: 93px;
background: url('Image URL') no-repeat scroll 0px 0px transparent;
}
I think not just css is being used, for the style and position yes but for the scrolling, probably done with jquery