超级版主
几种视频播放器的代码 (荐)
代码如下: <EMBED style="FILTER: alpha(opacity=15)" src=音乐地址 width="100%" height=45 type=audio/mpeg autostart="true" loop="true">
这个播放器可以根据你的页面大小而自动调整大小,放文章处和文章宽度一样,想当首页背景音乐,就放在模块里面,就会变的和你一侧的宽度一样,解决了有的人一侧的播放器显示不完整的问题!
再加一款大小正好放在一侧的音频播放器。06年-8月-27曰
代码如下: <DIV><EMBED codeBase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 src=音乐地址 width=180 height=65 type=application/x-oleobject flename="mp" autostart="true" loop="true"></EMBED></DIV>
代码说明: AUTOSTART="TRUE" 这里TRUE代表自动播放,如果换成FALSE则代表手动播放。
你现在看到的播放器样子没有变化,它取决你的音乐格式!
代码如下<EMBED src="歌曲地址" width=300 height=50 type=audio/mpeg loop="-1" autostart="FALSE" volume="0">
代码如下<EMBED style="FILTER: invert()" src="歌曲地址" width=300 height=50 type=audio/mpeg volume="0" autostart="FALSE" loop="true">
代码如下<EMBED style="FILTER: Xray" src=歌曲地址 width=300 height=05 type=audio/mpeg loop="-1" autostart="FALSE" volume="0">
代码如下<EMBED style="FILTER: GRAY()" src="歌曲地址" width=300 height=45 type=audio/mpeg loop="-1" autostart="FALSE" volume="0">
代码说明:1 WIDTH代表播放器宽度,HEIGHT代表高度,后面的数值可依自己喜好进行调整。2 AUTOSTART="TRUE" 这里TRUE代表自动播放,如果换成FALSE则代表手动播放。
装饰美化你的播放器
有了基本的款式后,我们就可以根据自己的想象力,巧用HTML的表格,根据自己的图片素材,装饰美化自己的播放器啦。只要你有足够的创意,调整代码,就可以得到各式各样的播放器。这里先介绍几款。
一款黑色播放器
<EMBED style="FILTER: Xray" src=音乐地址 width=300 height=45 type=audio/mpeg loop="- 1" autostart="false" volume="0">
迷彩播放器
<DIV> <CENTER><EMBED id=moaz style="BORDER-RIGHT: #666666 1px solid; BORDER-TOP: #666666 1px solid; FILTER: wave(); BORDER-LEFT: #666666 1px solid; BORDER-BOTTOM: #666666 1px solid" codeBase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,5,0803 src=音乐地址 width=179 height=47 type=application/x-oleobject loop="true" autostart="true" standby="Loading Windows Media Player components..." classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"></EMBED></CENTER></DIV>
我们也可以为黑色播放器加上一个边缘
<TABLE style="BORDER-RIGHT: #000000 3px dashed; BORDER-TOP: #000000 3px dashed; BORDER-LEFT: #000000 3px dashed; BORDER-BOTTOM: #000000 3px dashed" cellSpacing=0 cellPadding=0 bgColor=#00000> <TBODY> <TR> <TD> <TABLE borderColor=#000000 align=center border=1> <TBODY> <TR> <TD><P align=center><EMBED style="FILTER: Xray" src=http://cherry.jazzsky.com/LIU/all_about_you.wma width=300 height=45 type=audio/mpeg volume="0" autostart="false" loop="- 1"></P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
下面红底的部分为原黑色播放器代码
<EMBED style="FILTER: Xray" src=http://cherry.jazzsky.com/LIU/all_about_you.wma width=300 height=45 type=audio/mpeg volume="0" autostart="false" loop="- 1">
当然也可以为蓝色播放器加上粉色边缘
代码如下<TABLE style="BORDER-RIGHT: #ff69b4 3px dotted; BORDER-TOP: #ff69b4 3px dotted; BORDER-LEFT: #ff69b4 3px dotted; BORDER-BOTTOM: #ff69b4 3px dotted" cellSpacing=0 cellPadding=0 align=center bgColor=white> <TBODY> <TR> <TD><TABLE borderColor=#ff69b4 align=center bgColor=#ffccf5 border=2> <TBODY> <TR> <TD style="FILTER: alpha(opacity=100,style=3)"> <P align=center><EMBED src=歌曲地址 width=300 height=45 type=audio/mpeg volume="0" autostart="false" loop="-1"></P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
下面粉底部分为原蓝色播放器代码
<EMBED src=歌曲地址 width=300 height=45 type=audio/mpeg volume="0" autostart="false" loop="-1">
还可以将播放器置于一个单独的表格里,并加上表格的透明特效,播放器上的花纹就是表格的底图。
代码如下:<TABLE borderColor=#4f3256 align=center background=http://upload.yourblog.org/20057/kaka967.20050722115212.png border=1> <TBODY> <TR> <TD style="FILTER: alpha (opacity=50,style=3)"> <P align=center><EMBED src=歌曲地址 width=300 height=45 type=audio/mpeg loop="-1" autostart="false" volume="0"></P></TD></TR></TBODY></TABLE>
下面紫底部分的为原蓝色播放器代码
<EMBED src=歌曲地址 width=300 height=45 type=audio/mpeg loop="-1" autostart="false" volume="0">
还可以利用动态的GIF背景做成动态播放器
代码如下:<TABLE borderColor=#dee4fe cellSpacing=3 cellPadding=0 background=背景图片地址 border=2> <TBODY> <TR> <TD> <TABLE align=center border=0> <TBODY> <TR> <TD style="FILTER: alpha (opacity=60,style=3)"> <P align=center><EMBED style="FILTER: Gray" src=歌曲地址 width=300 height=45 type=audio/mpeg volume="0" autostart="false" loop="-1"> </P></TD></TR></TBODY></TABLE></TD></TR></TBODY> </TABLE>
下面蓝底部分为原灰色播放器代码
<EMBED style="FILTER: Gray" src=歌曲地址 width=300 height=45 type=audio/mpeg volume="0" autostart="false" loop="-1">
甚至还可以将动态背景只在播放器底部运行
代码如下<TABLE height=40 cellSpacing=0 cellPadding=0 width=300 background=背景图片地址 border=1> <TBODY> <TR> <TD> <TABLE style="FILTER: Chroma (Color=’#000000’)" height=40 cellSpacing=0 cellPadding=0 width=300 border=0> <TBODY> <TR> <TD> <P align=center><EMBED style="FILTER: Gray" src=歌曲地址 width=300 height=40 type=audio/mpeg loop="-1" autostart="false" volume="0"></P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
下面棕底字体为原灰色播放器代码
<EMBED style="FILTER: Gray" src=歌曲地址 width=300 height=40 type=audio/mpeg loop="-1" autostart="false" volume="0">
以上代码转自阿龙的BLOG为了方便朋友们的使用,我又进行了一些修改,实际上这些和我以前介绍的播放器已经重复了不少,不过后面这些美化播放器是我没有的,希望朋友们分享!
几种简单的音频播放器代码
查看详细资料
TOP