您当前的位置:易搜源码站网页设计其它相关 → 文章内容
RSS订阅

网站插入背景音乐代码收集

作者:佚名  来源:yscode.com整理  发布时间:2007-11-5 0:02:05

下面是在网页中插入音乐的常用代码,请选用最适合你的方法.

将这段代码插入到您的<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表示音效文件


文章评论 (评论内容只代表网友观点,与本站立场无关!)

用户名: 查看更多评论

分 值:100分 85分 70分 55分 40分 25分 10分 0分

内 容:

         (注“”为必填内容。) 验证码: 验证码,看不清楚?请点击刷新验证码