<bgsound>
非标准: 该特性是非标准的,请尽量不要在生产环境中使用它!
概要
<bgsound>是 IE 浏览器中设置网页背景音乐的元素。
备注: **不要使用它!**想要在网页中嵌入音频,应当使用<audio>
.
属性
示例
<bgsound src="sound1.mid">
<bgsound src="sound2.au" loop="infinite">
备注
类似的功能在一些版本的 Netscape 中使用 <embed> 标签来调用音频播放器。
你可以使用自闭合标签<bgsound />
。然后由于它并非标准的一部分,XHTML 会认为它无效。
浏览器兼容
BCD tables only load in the browser
参见
- The
<audio>
, which is the standard element to embed audio in a document.