There are two different uses and labels, and when you insert a background music you can set the width and height to 0 and hide the player.

Source: Internet
Author: User
<bgsound>:

<bgsound> is used to insert background music, but only applies to IE, its parameters are not set much. As follows

<bgsound src= "Your.mid" Autostart=true loop=infinite>

Src= "Your.mid"
Set MIDI files and paths that can be relative or absolute.
Autostart=true
Whether it will play automatically after the music file has been downloaded. True is, False no (default).
Loop=infinite
Whether to play it again and again automatically. loop=2 says repeat two times, infinite means repeat several times.

<embed>:

<embed> is used to insert a variety of multimedia, format can be midi, WAV, AIFF, AU and so on, Netscape and the new version of IE are supported. Its parameters are set more. The following

<embed src= "Your.mid" autostart= "true" loop= "true" hidden= "true" >

Src= "Your.mid"
Set MIDI files and paths that can be relative or absolute.
Autostart=true
Whether it will play automatically after the music file has been downloaded. True is, False no (default).
Loop= "true"
Whether to play it again and again automatically. loop=2 says repeat two times, true Yes, false No.
Hidden= "true"
Whether to completely hide the control screen, True is, no is no (default).
Starttime= "Minutes: Seconds"
Set the time when the song starts to play. such as starttime= "00:30" indicates that playback starts at 30th seconds.
Volume= "0-100"
Set the volume size, which is between 0 and 100. The default is to use the system itself settings.
Width= "integers" and high= "integers"
Set the height and width of the control panel. (If hidden= "no")
align= "Center"
Sets the alignment of the control panel and side text, which can be top, bottom, center, baseline, left, right, Texttop, middle, absmiddle, absbottom
Controls= "Smallconsole"
Sets the appearance of the control Panel. The preset value is the console.
Console General normal panel
Smallconsole smaller panel
PlayButton Show only play buttons
Pausecutton Only Show pause button
Stopbutton Show Stop button only
Volumelever only displays the volume adjustment button

Instance:

1. <!doctype HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/ Xhtml1-transitional.dtd ">
2. 3. 4. <meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
5. <title> Untitled Document </title>
6. 7.
8. <body>
9. <bgsound src= "Http://sj.cpgl.net/sjbbs/midi/md01.mid" Autostart=true loop=infinite>
</body>
One.
Copy Code

1. <!doctype HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/ Xhtml1-transitional.dtd ">
2. 3. 4. <meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
5. <title> Untitled Document </title>
6. 7.
8. <body>
9. <embed src= "http://www.bricklin.cn/zly/theone/2.wma" width= "0" height= "0" ></embed>
</body>
One.
Copy Code

*************************************************************************************************************** *******************

(i), basic grammar:

Embed Src=url

Description: Embed can be used to insert a variety of multimedia, format can be midi, WAV, AIFF, AU, mp3 and so on,

Netscape and the new version of IE are supported. The URL is an audio or video file and its path, which can be a relative path or an absolute path.

Example: <embed src= "Your.mid" >

(ii), property settings:

1. Auto Play:

Syntax: Autostart=true, False

Description: This property stipulates whether the audio or video files will play automatically after downloading.

True: Music files are played automatically after downloading;

False: The music file does not play automatically after the download is complete.

Example: <embed src= "Your.mid" autostart=true>

<embed src= "Your.mid" autostart=false>

2, loop playback:

Syntax: loop= positive integer, True, False

Description: This property stipulates whether the audio or video files are cycled and the number of cycles.

When the property value is a positive integer value, the audio or video file has the same number of cycles as the positive integer values;

Audio or video file loop when the property value is true;

When the property value is false, the audio or video file does not loop.

Example: <embed src= "Your.mid" Autostart=true loop=2>

<embed src= "Your.mid" Autostart=true loop=true>

<embed src= "Your.mid" Autostart=true loop=false>

3, Panel display:

Syntax: Hidden=ture, flase

Description: This property stipulates whether the control Panel is displayed and the default value is Flase.

Ture: Hidden panel;

Flase: Display panel.

Example: <embed src= "Your.mid" hidden= "ture" >

<embed src= "Your.mid" hidden= "no" >

4. Start time:

Syntax: Starttime=mm:ss (minutes: SEC)

Description: This property sets the time that an audio or video file should start playing. is not defined to play from the beginning of the file.

Example: <embed src= "Your.mid" starttime= "00:10" >

5, Volume Size:

Syntax: integers between volume=0-100

Description: This property sets the volume size of the audio or video file. Undefined uses the system's own settings.

Example: <embed src= "Your.mid" Volume= "ten" >

6, Container properties:

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.