¡Advertencia!
Este tema no ha tenido respuestas en más de un mes. Recuerda que si deseas añadir una nueva debes cumplir con las normas de la web.
<script type="text/javascript" src="dom-drag.js"></script>
<style type="text/css">
#thumb_c {
position:relative;
height:14px;
width:15px;
background-image: url(http://habbo-sky.es/items_flecha_arriba.gif);
}
#thumb_b {
position:relative;
height:150px;
width:15px;
background-image: url(http://habbo-sky.es/items_flecha_center.gif);
}
#thumb_a {
position:relative;
height:14px;
width:15px;
background-image: url(http://habbo-sky.es/items_flecha_abajo.gif);
}
#thumb_d {
position:relative;
height:15px;
width:15px;
background-image: url(http://habbo-sky.es/flecha.GIF);
}
</style>
<div style="width: 250px; height: 200px; overflow: hidden; border: 1px solid black; float: left; margin-right: 10px; background-color: lightyellow; position: relative">
<div id="scrollcontent" style="position: absolute; left: 0; top: 0">
<p>Some text</p><p>Some text</p><p>Some text</p>
<p>Some text</p><p>Some text</p><p>Some text</p>
<p>Some text</p><p>Some text</p><p>Some text</p>
</div>
</div>
<div style="width: 30px; float: left">
<div id="thumb_c" style="left:0; top:0;"></div><div id="thumb_b" style="left:0; top:0;"><div id="thumb_d" style="left:0; top:0;"></div></div><div id="thumb_a" style="left:0; top:0;"></div>
</div>
<script language="javascript">
var aThumb = document.getElementById("thumb_d");
var scrolldiv=document.getElementById("scrollcontent");
Drag.init(aThumb, null, 0, 0, 0, 135);
aThumb.onDrag = function(x, y) {
scrolldiv.style.top=y * (-1) "px";
}
</script>
Drag.init(aThumb, null, 0, 0, 0, [b]135[/b]);