scroll image with continuous scrolling using marquee tag

前端 未结 4 1133
轻奢々
轻奢々 2020-12-17 04:53

I am using a tag for continues moving of image horizontally. Suppose I have a 5 images than it moving fine but after completion of last image m
4条回答
  •  鱼传尺愫
    2020-12-17 05:28

    You cannot scroll images continuously using the HTML marquee tag - it must have JavaScript added for the continuous scrolling functionality.

    There is a JavaScript plugin called crawler.js available on the dynamic drive forum for achieving this functionality. This plugin was created by John Davenport Scheuer and has been modified over time to suit new browsers.

    I have also implemented this plugin into my blog to document all the steps to use this plugin. Here is the sample code:

    
        
        
    
    
    

    Here is the plugin configration:

    marqueeInit({
        uniqueid: 'mycrawler2',
        style: {
        },
        inc: 5, //speed - pixel increment for each iteration of this marquee's movement
        mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
        moveatleast: 2,
        neutral: 150,
        savedirection: true,
        random: true
    });
    

提交回复
热议问题