How to implement the _javascript technique of making lyrics roll play based on JavaScript

Source: Internet
Author: User
Tags wrapper

A variety of music players have an automatic scrolling function of the lyrics, the current scroll to the lyrics will be highlighted in the center, even if the lyrics are changed lines can be normal center, then this function based on JavaScript how to achieve the lyrics scrolling? Please read the following detailed.

The general music Player uses the lyrics format is LRC, in order to facilitate processing, we use the XML format lyrics here. Introduce a website: Chinese lyrics library. It provides lyrics in XML format.

Let's take a look at the final effect of this example:

Here is the specific code based on jquery:

<! DOCTYPE html>  

The above is a detailed description of this article based on JavaScript how to achieve the full content of the lyrics scrolling, I hope you like.

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.