1.多媒体的格式
<audio>
元素支持三种音频格式文件mp4,webm和ogg
autoplay自动播放,有些浏览器版本问题,播放不出来
loop循环播放
muted静音
preload:auto(自动) metaddata(加载元数据) none(不加载)
<audio controls="controls" autoplay="autoplay" loop="loop">
<source src="music/Nirvana - Heart-Shaped Box.ogg" type="audio/ogg"></source>
<source src="music/Nirvana - Heart-Shaped Box.mp3" type="audio/mp3"></source>
<source src="music/Nirvana - Heart-Shaped Box.wav" type="audio/wav"></source>
</audio>
<video>
元素支持三种格式MP4,ogg,webm
<video controls="controls" width="600px" poster="musci/bacg.jpg">
<source src="music/Nirvana - Heart-Shaped Box.mp4" type="audio/mp4"></source>
<source src="music/Nirvana - Heart-Shaped Box.webm" type="audio/webm"></source>
<source src="music/Nirvana - Heart-Shaped Box.ogg" type="audio/ogg"></source>
</video>