Current location - Music Encyclopedia - NetEase Cloud Music - Is it possible to add background music in web design? Don’t add music boxes.
Is it possible to add background music in web design? Don’t add music boxes.

Yes,

Insert this code between your

You can hear it when you open the website Background music:

Specify the size of the player (width, height), whether to automatically play (autostart tag), whether to loop (loop tag), and the viewer can decide whether to play music independently. , 1.mid is the file to be played.

There is also the simplest way to write it, which is to insert it between your .

This kind of music will disappear when the web page is minimized. china.mid is the file to be played, and loop is whether to loop (-1 means looping all the time, if it is 1, it will be played once, if it is 2, it will be played twice..., but it must not be set to 0).