Home  >  Article  >  Web Front-end  >  The effect of text running upward based on jquery is similar to that of a marquee_jquery

The effect of text running upward based on jquery is similar to that of a marquee_jquery

WBOY
WBOYOriginal
2016-05-16 16:44:101712browse

I wanted to achieve an effect similar to a marquee, but found that the marquee had spaces. The effect was not beautiful, so I used jquery to write a

page code

Copy Code The code is as follows:




  • Congratulations to 187****5204 for getting 1000RBM


  • Congratulations to 137****1372 for winning 1000RBM


  • Congratulations to 156****0276 for getting 1000RBM


  • Congratulations to 139 ****9856 got 1000RBM


  • Congratulations to 136****0580 for getting 1000RBM
    < ;/li>

  • Congratulations to 136****0580 for winning 1000RBM


  • Congratulations to 138****8118 for getting 1000RBM

  • Congratulations to 136****5555 for getting 1000RBM


  • Congratulations to 136****0580 Obtained 1000RBM


  • Congratulations to 136****0580 for obtaining 1000RBM




js code
Copy code The code is as follows:

/*Automatic rotation xuyw*/
var AutoScroll = function(a) {
$(a).find("ul:first").animate ( {
marginTop : "-20px"
}, 500, function() {
$(this).css( {
marginTop : "0px"
}).find(" li:first").appendTo(this)
})
}
if ($(".recordList ul li").length > 0) {
setInterval('AutoScroll(". recordList")', 2000)
} else {
$(".recordList").hide()
}
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn