JS text effect like the lyrics follow the sound.

Source: Internet
Author: User

    • A relatively good text display effects, like MTV lyrics show as the singer slowly one after another to show, this special effect code to achieve and this function almost, and JS code very little, Compatibility good, click Run to see the effect bar!
<HTML><Head><title>Shijiazhuang Flowers</title></Head><Body><Scriptlanguage= "JavaScript">varmessage="like the lyrics show the same JS text effect! "varNeonbasecolor="Gray"varNeontextcolor="Blue"varFlashspeed= -varN=0if(document.all) {document.write ('<font size= "3" color= "'+Neonbasecolor+'">') for(M=0; M<message.length;m++) document.write ('<span id= "Neonlight" >'+Message.charat (m)+'</span>') document.write ("')varTempref=Document.all.neonlight}Elsedocument.write (message)functionNeon () {if(n==0){ for(M=0; M<message.length;m++) Tempref[m].style.color=Neonbasecolor}tempref[n].style.color=Neontextcolorif(n<Tempref.length-1) n++Else{n=0clearinterval (flashing) setTimeout ("Beginneon ()", the)return}}functionBeginneon () {if(document.all) Flashing=SetInterval ("Neon ()", Flashspeed)} Beginneon ()</Script></Body></HTML>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.