0

JQUERY

        $(document).ready(function(){
            var wi = 0;
            window.setInterval(function() {
                wi += 15;
             $(".students-holder").animate({"position": "relative","left": wi});
            }, 1);
        })

CSS

.students{
background: #262525;
width: 860px;
height: 54px;
padding: 0 5px;
position:relative;
overflow:hidden;}

.students-holder{
min-width:2000px;
position:absolute;
left:-50px;}

.inline-image{
display:inline-block;}

HTML

<div class="students">
<div class="students-holder">
    <img class="inline-image" src="https://graph.facebook.com/mardhagz/picture"/>
    <img class="inline-image" src="https://graph.facebook.com/mardhagz/picture"/>
    <img class="inline-image" src="https://graph.facebook.com/mardhagz/picture"/>
    <img class="inline-image" src="https://graph.facebook.com/mardhagz/picture"/>
</div></div>

DEMO LINK http://jsfiddle.net/2vCNR/

There :/ anyone know like marquee direction to left? if mouseover will stop(); mouseout run(); :/ please help...

4

1 回答 1

0

使用这个 JQuery :

    $(document).ready(function(){
        var wi = 0;
        window.setInterval(function() {
            wi -= 5;
         $(".students-holder").animate({"position": "relative","left": wi});
        }, 1);
    })
于 2012-07-20T10:12:28.880 回答