网页设计之网页音乐的实现技巧

发布时间:2025-07-05 点击:2
当网页中插入音乐时,要根据不同的后缀名,来写不同的代码!下面面就是多种格式文件的详细使用代码。
注:
音乐文件和地址——待播放文件的文件名,前面带上绝对路径,或者本站的相对路径。
width_num——指定一个作为宽度的数字;
height_num——指定一个作为高度的数字;
1.mid
<embed src=音乐文件和地址 type=audio/midi hidden=false autostart=true loop=true height=height_num width=width_num></embed>2.mp3
<embed controller=true width=width_num height=height_num src=音乐文件和地址 border=0 pluginspage=http://www.apple.com/quicktime/download/indext.html></embed>3.avi
<embed src=音乐文件和地址 border=0 width=width_num height=height_num type=application/x-mplayer2></embed>4.flash
<embed src=音乐文件和地址 pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash type=application/x-shockwave-flash width=width_num height=height_num play=true loop=true quality=high scale=showall menu=true></embed>5.mpg
<embed src=音乐文件和地址 border=0 width=width_num height=height_num type=application/x-mplayer2></embed>6.mov
<embed controller=true width=width_num height=height_num src=音乐文件和地址 border=0 pluginspage=http://www.apple.com/quicktime/download/indext.html></embed>
7.rm
<object> height=height_num><param name=controls value=imagewindow><param name=autostart value=true><param name=src value=音乐文件和地址><embed height=高 width=宽 controls=imagewindow src=音乐文件和地址 type=audio/x-pn-realaudio-plugin autostart=true nolabels=0 autogotourl=-1></object>8.上面的都是使用播放器的,如果只是想播放背景音乐的话可以使用如下简单语句:
<bgsound src=音乐文件和地址 loop=1>loop后面是循环的次数,-1代表无限循环。


导致网站不收录的原因有哪些
新加坡服务器的正确维护方式有哪些
网站模板:手机端网站如何建立
弋阳网站推广如何进行站内外优化?
SEO 优化的关键是什么?
网站SEO优化过程涵盖了哪些方面呢
公司制作网站时尽量要找专业靠谱的网络公司才行
企业微信网站建设有哪些必要性