学习
实践
活动
专区
工具
TVP
写文章

网页背景音乐设置

一、添加背景音乐时,一般会用到两种标签: 1、<bgsound> 2、<embed> 二、一般用法 : <bgsound src=”音频源” autostart=”true” loop=”false” /> <embed src=”音频源” autostart=”true” loop=”false” /> 三、标签属性 : 1、autostart 当为 true 时 是自动播放模式 。 (一)、正常情况下的写法: if($.browser.msie){ $(“.mp3″).html(‘<bgsound src=”music/one.mp3″ autostart=”true” loop= 解决:在判断为IE内核时 把两个标签都加载进去 ,而已<embed>标签要在<bgsound>前,并且将自动播放设置为 autostart=”false”; 如: if($.browser.msie){ =”music/one.mp3″ autostart=”true” loop=”true” hidden=”true” />’); }else{ $(“.mp3″).html(‘<embed src=”

24910
  • 广告
    关闭

    有奖征文丨玩转 Cloud Studio

  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    网页背景音乐代码

    x-shockwave-flash” width=”1″ height=”1″></embed> 上面的网页背景音乐代码可以加入FLASH动画的绝对地址(或相对地址) <embed width=1 height=1 autostart ram格式的音乐文件专用网页背景音乐代码 <embed src=”/1.mid” align=”center” border=”0″ width=”1″ height=”1″ width=”100″ autostart =”true” loop=”true”> 指定播放器的大小(width、heigh)、是否自动(autostart标记)、是否循环播放(loop标记),而浏览者则可以自主地决定是否播放音乐。 <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

    36220

    扫码关注腾讯云开发者

    领取腾讯云代金券