科氏力质量流量计:如何在自己的主页有音乐效果

来源:百度文库 编辑:神马品牌网 时间:2024/05/01 19:30:09
当一打开自己的主页的时候同时有声音的出现,是怎么设置的,高手帮帮忙.

在网页代码中的<head>下添加:
<bgsound src="音乐文件地址" loop="-1">

-1为循环播放,1为播放一次

在dramerwever和frontpage里面的页面属性里面有一个选项里有插入背景音乐,但是最好是midi或是wma。这样文件比较小,而且大部分的电脑都能识别!

网页背景音乐代码:

将这段代码插入到您的<head></head>之间
当您打开网站时即可听到背景音乐:
<bgsound src=china.mid loop="-1">
这种当网页最小化之后,音乐会消失

网页背景音乐的代码:
<embed src="http://XXX.com/XXX.mp3" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="1" height="1"></embed>
1.mid表示音效文件
<embed src="1.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="1" height="1"></embed>
上面的网页背景音乐代码可以加入FLASH动画的绝对地址(或相对地址)
<embed width=1 height=1 autostart="true" loop="true" controls=PlayButton console=clip1 nolabels=true type="audio/x-pn-realaudio-plugin" src="1.ram"> </embed>
ram格式的音乐文件专用网页背景音乐代码:
<embed src="1.mid" align="center" border="0" width="1" height="1" width="100" autostart="true" loop="true">
指定播放器的大小(width、heigh)、是否自动(autostart标记)、是否循环播放(loop标记),而浏览者则可以自主地决定是否播放音乐。
此代码可以当作网页中插入FLASH动画的代码用。只要把1.mid替换为FLASH动画的相对地址或决对地址就OK了。
<embed src="1.mp3" align="center" border="0" width="1" height="1" width="100" autostart="true" loop="true">
此代码可以加mp3形式的音乐为网页背景音乐
<EMBED src="http://XXX.com/XXX.mp3" width="0" height="0" border=0 autostart="ture" loop="ture"></EMBED>
1.mid表示音效文件
<bgsound src="1.mid" loop=3>
表示将1.mid音效文件插入到页面为背景音乐,并循环播放3次。
<embed src="1.mid" hidden="true">
1.mid表示音效文件
<bgsound src="1.mid" loop="infinte">
1.mid表示音效文件
<embed src="1.mid" hidden="true" loop="true">
1.mid表示音效文件
<bgsound src=1.mid loop="-1">
1.mid表示音效文件