Current location - Music Encyclopedia - QQ Music - How to add background music to a web page?
How to add background music to a web page?

1. First put the selected music files into the same file on the web page, as shown in the figure.

2. Open the webpage with Adobe Dreamweaver CS6 software, point the mouse at any location you want to place the music background in the webpage design bar, then select Insert/Media (M)/Plug-in (P) in the menu bar, and follow the path Select the MP3 file you need to set background music and double-click the left mouse button.

3. Click the mouse on the plug-in to see the property bar below. According to the property bar, we can adjust the background width arbitrarily. Save and refresh the web page to see that background music can be played automatically on the web page.

4. Select the plug-in in the software design bar, open the code bar, add hidden= rue to the code height=4, save and refresh the web page, you will see that the music background has been hidden, but the music is still playing. .

5. Set the music loop playback and the number of playback times: also add a loop= to the code height=4, alse means no replay, loop= rue means loop playback, loop= means playback 5 times.