How to add background music in Dreamweaver web page making?
Just insert a behavior: 1. There are generally two ways to learn to add music files to add background music to web pages. The first way is to add through the ordinary tag, and the other way is to add through the < embed > tag. (1) Use the "bgsound" tab to open the page in Dreamweaver where background music needs to be added, click "Code" to open the code editing view, enter ""between "body" and "/body", and select bgsound in the pop-up code prompt box. Dreamweaver automatically enters the "bgsound" code, and then presses the space bar. The code prompt box will automatically list the properties of the bgsound tag for you to choose from. The bgsound tag has five attributes, in which balance is to set the left and right balance of music, delay is to set the playback delay, loop is to control the number of loops, src is the path of our music file, and volume is to set the volume. Generally, when adding background music, we don't need to set the balance and delay of music, just need a few main parameters. The final code is as follows: < bgsound src = "music. Mid" loop="- 1 "> where loop="- 1" means that music plays endlessly. If you want to set the number of plays, you can change it to the corresponding number. This method of adding background music is the most basic method and the most commonly used method. For background music formats, most mainstream music formats are supported, such as WAV, MID, MP3 and so on. If you want to take into account the browser with low network speed, you can use MID sound effect as the background music of the webpage. Because the MID music file is relatively small, it can be loaded and played quickly in the process of opening the webpage. However, MID also has some shortcomings, because it can only store the melody of music, without good harmony and lyrics. If you have a fast Internet connection or find MID music a bit monotonous, you can also join MP3 music. Just change happy.mid in the above code to happy.mp3 Tip: It is more convenient to add background music in FrontPage than Dreamweaver, just make relevant settings in the background dialog box. (2) Using the "embed" tag The method of adding music using the "embed" tag is not very common, but it is very powerful. If you combine some playback controls, you can create a network player. Its use method is basically the same as the first one, except that in the first step, we chose embed instead of gbsound in the code prompt box. Then select its properties and set them accordingly (Figure 3). As we can see from the figure, the attributes of embed are much more than the five attributes of gbsound.