html5 多媒体页面(Alternative Inline Elements)

来源:互联网 发布:买药软件 编辑:程序博客网 时间:2024/05/12 04:42

嵌入多媒体文本(EMBED)

基本语法 <embed src=#> #=URL

本标记可以用来在主页中嵌入多媒体文本,如:
电影(movie), 声音(sound), 虚拟现实语言(vrml)... ...
体会 <embed> 标记,您需要把 plugin 安装完备。
请注意:embed attributes are different between each plugins.

+ 背景音乐

<bgsound src=#> #=WAV 文件的 URL<bgsound loop=#> #=循环数

<bgsound src="sound.wav" loop=3>

示例

+插入视频剪辑

<img src="url.gif" dynsrc="url.avi">

用 url.avi 这一 AVI(Video for MS-WINDOWS) 文件来播放视频;用 url.gif 这一 GIF 图象作为视频的封面,即:在浏览器尚未完全读入 AVI 文件时,先在 AVI 播放区域显示该图象。
<img src="SAMPLE-S.GIF" dynsrc="SAMPLE-S.AVI">

何时开始播放 AVI <img start=#> #=fileopen, mouseover

缺省值是 #=fileopen,即在链接到含本标记的页面(如本页)时开始播放 AVI。

mouseover 是指您把鼠标移到 AVI 播放区域之上时才开始播放 AVI。

也可以两者同时设置:<img start=fileopen,mouseover>

另外,用鼠标在 AVI 播放区域点击一下,也将令浏览器开始播放该 AVI。

<img src="SAMPLE-S.GIF" dynsrc="SAMPLE-S.AVI" start=mouseover>

控制条 <img controls>

用来在视频窗口下附加 MS-WINDOWS 的 AVI 播放控制条。
<img src="SAMPLE-S.GIF" dynsrc="SAMPLE-S.AVI" controls>

循环播放 <img loop=#>

<loop=infinite> 将循环播放不止。

<img src="SAMPLE-S.GIF" dynsrc="SAMPLE-S.AVI" loop=3>

延时 <img loopdelay=#> #=毫秒数

<img src="SAMPLE-S.GIF" dynsrc="SAMPLE-S.AVI"  loop=3 loopdelay=250>

0 0