Make a continuous background music on the home page

Source: Internet
Author: User
Tags set background

Many netizens like to add a beautiful background music to the homepage, it does give a lot of luster to the homepage, and it also leaves a deep impression on the visitors. But once you click on a hyperlink and go to a deeper page in your site, the background music you set on the home page is interrupted until you return to the home page and the music you interrupted just started from scratch. This destroys the continuity of the home background music and makes people feel uncomfortable.

The author in the home page using the main page frame to maintain the continuous background music, the effect is very good, now introduced below, for the production of personal homepage Friends reference:

First, use the label 〈frameset〉〈frame...〉〈frame...〉〈frameset〉 to divide the home page (index.html) screen into two frames, set the height of the top frame to 0 to not break the page layout, and then place the hypertext file in the frame on the home page ( back_music.htm) to set the background music of the Web site, it is best not to set the playback interface; Finally, place the main content (main.htm) of the site's home page in the next frame on the home page.

As a result, the page below the frame of the home page becomes the actual active page of the homepage, the page on the frame will remain stationary throughout the visitor's browsing process, and the set background music won't be interrupted.

According to the above instructions, the author provides a simplified example below (the reader can also refer to the author of the construction of the site http://www.ntax.com.cn background music effect):

Home page File index.html:
 

html〉

〈head〉〈title〉 Continuous background music 〈/title〉〈/head〉

〈frameset frameborder= "0" rows= "0,*"

〈frame src= "back_music.htm" scrolling= "no" noresize "0"

〈frame src= "main.htm" frameborder= "0"

〈noframes〉

〈body〉

〈p〉please Browse the Web pages with browser that supperts frames. 〈/p〉

〈/body〉

〈/noframes〉

〈/frameset〉

〈/html〉

Previous Frame file back_music.htm (background music is liang_zhu.mid in current directory, play only once):

〈html〉

〈head〉〈title〉〈/title〉〈/head〉

〈body〉

〈!-background music:--〉

〈embed src= "./liang_zhu.mid" hidden= "true" autostart= "true" loop= "0"

〈/body〉

〈/html〉

Because the current popular browsers (ie, Netscape, etc.) mostly support screen frame technology, so the use of screen-frame technology to maintain the continuous background music has general versatility. This method is used normally in browser versions such as IE series and netscapecommunicator 4.03.

Of course, if you make the home page is used by the frame technology, it would be better, as long as the setting of the words to set the background music in the static frame, everything is done.



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.