Current location - Music Encyclopedia - QQ Music - How to insert background music into a website How to add background music to a web page
How to insert background music into a website How to add background music to a web page

How to insert background music into a web page? Sometimes you need to add background music to your web page. Next, let’s take a look at how to insert background music into a web page. 01

Import music

First import a piece of music, as shown below: 02

bgsoundsrc=img\sx.mp3loop=-1gt;

2. In the text content of the DIV in this webpage, you can add a webpage with background music;

3. To add background music to the webpage, you can use the embed tag and add the src attribute to it. , which is used to specify the path where the music is located, embedsrc="tt.mp3"hidden="true";

4. In order to hide the background music with this multimedia control, the embed tag adds the hidden attribute. To make the background music play automatically after opening the web page, we can add the autostart attribute, autostart="true";

5. By default, the multimedia control will only play once and stop after playing. If you want To make the background music play continuously, you can add the loopn attribute, loop="true".

How to add background music to novels?

When you are recording, just add the music you want to match. First download the music to the local software, and then pour it into the local software.

How to make background music?

1. First, create a simple web page with only one DIV text content;

2. In the DIV text content of this web page, you can add background music Web page;

3. To add background music to the web page, you can use the embed tag and add the src attribute to it. This is used to specify the path where the music is located, embedsrc="tt.mp3"hidden=" true";

4. In order to hide the background music with this multimedia control, the embed tag adds the hidden attribute. To make the background music play automatically after opening the web page, we can add the autostart attribute, autostart=" true";

5. By default, the multimedia control will only play once and stop after playing. If you want the background music to play continuously, you can add the loopn attribute, loop="true".