0

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?

enter image description here

user3352395
  • 205
  • 1
  • 3
  • 9

4 Answers4

1

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

Anoop Joshi P
  • 25,373
  • 8
  • 32
  • 53
1

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');

Demo: http://jsfiddle.net/d5czx/

dfsq
  • 191,768
  • 25
  • 236
  • 258
0

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;
}
m-farhan
  • 1,436
  • 13
  • 14
0

I think not just css is being used, for the style and position yes but for the scrolling, probably done with jquery