|
|
|
| На форуме нашел такой скролл, только он вертикальный, а мне нужен горизонтальный. Толку переделать не хватает. Помогите)!
<html><head>
<style>
div.dud {width: 80px; padding: 5px 0; background-color: silver; text-align: center; cursor: default}
img.mini {width: 80px; height: 50px; position: relative}
#PANORAMA {width: 80px; height: 234px; overflow: hidden}
</style>
<script>
var N = 2, K = 0;
function f ()
{
var o = document.getElementById ('PANORAMA');
var s = o.childNodes;
if (N == 0)
{
if (K != -50) {K--; for (var j = 0; j < s.length; j++) s [j].style.left = K + 'px'}
else
{
var n = s [0].cloneNode (1); o.appendChild (n); o.removeChild (s [0]);
for (var z = o.childNodes, j = 0; j < z.length; j++) z [j].style.top = '0px'; K = 0;
}
}
if (N == 1)
{
if (K != 0) {K++; for (var j = 0; j < s.length; j++) s [j].style.top = K + 'px'}
else
{
for (var n = new Array (), j = 0; j < s.length; j++) n [j] = s [j].cloneNode (1);
o.replaceChild (n [n.length - 1], s [0]);
for (var j = 1; j < s.length; j++) o.replaceChild (n [j - 1], s [j]);
for (var z = o.childNodes, j = 0; j < z.length; j++) z [j].style.top = '-50px'; K = -50;
}
}
if (N < 2) setTimeout (f, 100);
}
</script>
</head>
<body>
<div class="dud" style="margin-bottom: 4px" onMouseOver="if (N) {N = 0; f ()}">Up</div>
<div id="PANORAMA"
><img class="mini" onMouseOver="N=2" style="background-color: red" alt="каждый"
><img class="mini" onMouseOver="N=2" style="background-color: orange" alt="охотник"
><img class="mini" onMouseOver="N=2" style="background-color: yellow" alt="желает"
><img class="mini" onMouseOver="N=2" style="background-color: green" alt="знать"
><img class="mini" onMouseOver="N=2" style="background-color: aqua" alt="где"
><img class="mini" onMouseOver="N=2" style="background-color: blue" alt="сидит"
><img class="mini" onMouseOver="N=2" style="background-color: violet" alt="фазан"
></div>
<div class="dud" style="margin-top: 4px" onMouseOver="if (N != 1) {N = 1; f ()}">Down</div>
</body>
</html>
|
| |
|
|
|
|
|
|
|
|
для: АЯ
(01.02.2010 в 13:29)
| | Вот спасибо так спасибо)))) | |
|
|
|