How to make your web site become more magnetic? What people normally will do is adding background music to the pages of web sites or blogs. Here is an introduction of how to add background music to your pages.
Erenow, I need to describe some shortcomings of using background music:
1. More bandwidth is needed. Of course, we can use the mp3 format instead of wav one which has smaller music file size, but more bandwidth is still needed than those general HTML pages.
2. W3C doesn't support "embed" tags.
3. Users can control the volume by hand, but adding background music will affect the browsing definitely.
By knowing about these, if you still want to do so. You need:
First of all, you should have a music file in mp3, wav or mid format. It also could be music file URL on the web. Whatever you choose, smaller size is always the best. Some people will recommend the URL one.
Then, we can embed it into pages with HTML code. Here, we use "embed" tags.
The code means: once a user open this page, the given background music would be loaded and played. When the music is finished, music is stopped. If you want to repeatly play this music, "loop" attribution could be input. If the value is set as true, the music will be repeated; if false, it will stop once finished. The code is like this:
没有评论:
发表评论