【教程】html+css零基本入门教程(八)
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">在 HTML 中播放声音<span style="color: black;">或</span>视频的<span style="color: black;">办法</span>有<span style="color: black;">非常多</span>种。</strong></span></p><span style="color: black;">HTML 音频</span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">问题,以及<span style="color: black;">处理</span><span style="color: black;">办法</span></strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">在 HTML 中播放音频并<span style="color: black;">不易</span>!</p>您需要谙熟<span style="color: black;">海量</span>技巧,以<span style="color: black;">保证</span>您的音频文件在所有浏览器中(Internet Explorer, Chrome, Firefox, Safari, Opera)和所有硬件上(PC, Mac , iPad, iPhone)都能够播放。
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">运用</span>插件</strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">浏览器插件是一种扩展浏览器标准功能的小型计算机程序。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">插件有<span style="color: black;">非常多</span>用途:播放音乐、<span style="color: black;">表示</span>地图、验证银行账号,<span style="color: black;">掌控</span>输入等等。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">可<span style="color: black;">运用</span> 或 标签来将插件添加到 HTML 页面。</p>这些标签定义资源(<span style="color: black;">一般</span>非 HTML 资源)的容器,<span style="color: black;">按照</span>类型,它们即会由浏览器<span style="color: black;">表示</span>,<span style="color: black;">亦</span>会由外部插件<span style="color: black;">表示</span>。
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">运用</span> <embed> 元素</strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><embed> 标签定义<span style="color: black;">外边</span>(非 HTML)内容的容器。(这是一个 HTML5 标签,在 HTML4 中是<span style="color: black;">违法</span>的,<span style="color: black;">然则</span>所有浏览器中都有效)。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">下面的代码片段能够<span style="color: black;">表示</span>嵌入网页中的 MP3 文件:</span></p><span style="color: black;"><embed height="100" width="100" src="song.mp3" /></span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">问题:</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">1)<embed> 标签在 HTML 4 中是无效的。页面<span style="color: black;">没法</span><span style="color: black;">经过</span> HTML 4 验证。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">2)<span style="color: black;">区别</span>的浏览器对音频格式的支持<span style="color: black;">亦</span><span style="color: black;">区别</span>。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">3)<span style="color: black;">倘若</span>浏览器不支持该文件格式,<span style="color: black;">无</span>插件的话就<span style="color: black;">没法</span>播放该音频。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">4)<span style="color: black;">倘若</span>用户的计算机未安装插件,<span style="color: black;">没法</span>播放音频。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">5)<span style="color: black;">倘若</span>把该文件转换为其他格式,仍然<span style="color: black;">没法</span>在所有浏览器中播放。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">注释:</strong><span style="color: black;">运用</span> <!DOCTYPE html> (HTML5) <span style="color: black;">处理</span>验证问题。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">运用</span> <object> 元素</strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><object tag>标签<span style="color: black;">亦</span><span style="color: black;">能够</span>定义<span style="color: black;">外边</span>(非 HTML)内容的容器。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">下面的代码片段能够<span style="color: black;">表示</span>嵌入网页中的 MP3 文件:</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">实例</strong></span></p><span style="color: black;"><object height="100" width="100" data="song.mp3"></object></span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">问题</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">1)<span style="color: black;">区别</span>的浏览器对音频格式的支持<span style="color: black;">亦</span><span style="color: black;">区别</span>。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">2)<span style="color: black;">倘若</span>浏览器不支持该文件格式,<span style="color: black;">无</span>插件的话就<span style="color: black;">没法</span>播放该音频。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">3)<span style="color: black;">倘若</span>用户的计算机未安装插件,<span style="color: black;">没法</span>播放音频。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">4)<span style="color: black;">倘若</span>把该文件转换为其他格式,仍然<span style="color: black;">没法</span>在所有浏览器中播放。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">运用</span> HTML5 <audio> 元素</strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><audio> 元素是一个 HTML5 元素,在 HTML 4 中是<span style="color: black;">违法</span>的,但在所有浏览器中都有效。</span></p><span style="color: black;"><audio controls="controls">
<source src="song.mp3" type="audio/mp3" />
<source src="song.ogg" type="audio/ogg" />
Your browser does not support this audio format.
</audio></span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">上面的例子<span style="color: black;">运用</span>了一个 mp3 文件,<span style="color: black;">这般</span>它在 Internet Explorer、Chrome 以及 Safari 中是有效的。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">为了使这段音频在 Firefox 和 Opera 中<span style="color: black;">一样</span>有效,添加了一个 ogg 类型的文件。<span style="color: black;">倘若</span>失败,会<span style="color: black;">表示</span>错误<span style="color: black;">信息</span>。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">问题:</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">1)<audio> 标签在 HTML 4 中是无效的。页面<span style="color: black;">没法</span><span style="color: black;">经过</span> HTML 4 验证。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">2)您必须把音频文件转换为不同的格式。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">3)<audio>元素在老式浏览器中不起<span style="color: black;">功效</span>。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">注释:</strong><span style="color: black;">运用</span> <!DOCTYPE html> (HTML5) <span style="color: black;">处理</span>验证问题。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">最好的 HTML <span style="color: black;">处理</span><span style="color: black;">办法</span></strong></span></p><span style="color: black;">
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> height="100" width="100">
</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> type="audio/mp3" />
</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> type="audio/ogg" />
</p>width="100" src="song.mp3" />
</audio>
</span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">上面的例子<span style="color: black;">运用</span>了两个<span style="color: black;">区别</span>的音频格式。HTML5 <audio> 元素会尝试以 mp3 或 ogg 来播放音频。<span style="color: black;">倘若</span>失败,代码将回退尝试 <embed> 元素。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">问题:</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">1)您必须把音频转换为<span style="color: black;">区别</span>的格式。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">2)<audio> 元素<span style="color: black;">没法</span><span style="color: black;">经过</span> HTML 4 和 XHTML 验证。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">3)<embed> 元素<span style="color: black;">没法</span><span style="color: black;">经过</span> HTML 4 和 XHTML 验证。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">4)<embed> 元素<span style="color: black;">没法</span>回退来<span style="color: black;">表示</span>错误<span style="color: black;">信息</span>。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">注释:</strong><span style="color: black;">运用</span> <!DOCTYPE html> (HTML5) <span style="color: black;">处理</span>验证问题。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">向网站添加音频的最简单<span style="color: black;">办法</span></strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">向网页添加音频的最简单的<span style="color: black;">办法</span>是什么?</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">雅虎的<span style="color: black;">媒介</span>播放器绝对算其中之一。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">运用</span>雅虎<span style="color: black;">媒介</span>播放器是一个<span style="color: black;">区别</span>的途径。您只需简单地让雅虎来完成歌曲播放的工作就好了。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">它能播放 mp3 以及一系列其他格式。<span style="color: black;">经过</span>一行简单的代码,您就<span style="color: black;">能够</span>把它添加到网页中,<span style="color: black;">容易</span>地将 HTML 页面转变为专业的播放列表。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">雅虎<span style="color: black;">媒介</span>播放器</strong></span></p><span style="color: black;">
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Play Sound
</p>src="http://mediaplayer.yahoo.com/js">
</script>
</span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">运用</span>雅虎播放器是免费的。如需<span style="color: black;">运用</span>它,您需要把这段 JavaScript <span style="color: black;">插进</span>网页底部:</span></p><span style="color: black;"> src="http://mediaplayer.yahoo.com/js">
</script> </span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">而后</span>只需简单地把 MP3 文件链接到您的 HTML 中,JavaScript 会自动地为每首歌创建播放按钮:</span></p><span style="color: black;"><a href="song1.mp3">Play Song 1</a>
<a href="song2.mp3">Play Song 2</a>
...
...
...</span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">雅虎<span style="color: black;">媒介</span>播放器为您的用户<span style="color: black;">供给</span>的是一个小型的播放按钮,而不是完整的播放器。<span style="color: black;">不外</span>,当您点击该按钮,会弹出完整的播放器。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">请<span style="color: black;">重视</span>,这个播放器始终停靠在窗框底部。只需点击它,就可将其滑出。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">运用</span>超链接</strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">倘若</span>网页<span style="color: black;">包括</span>指向<span style="color: black;">媒介</span>文件的超链接,大<span style="color: black;">都数</span>浏览器会<span style="color: black;">运用</span>"辅助应用程序"来播放文件。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">以下代码片段<span style="color: black;">表示</span>指向 mp3 文件的链接。<span style="color: black;">倘若</span>用户点击该链接,浏览器会<span style="color: black;">起步</span>"辅助应用程序"来播放该文件:</span></p><span style="color: black;"><a href="song.mp3">Play the sound</a></span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">内联的声音</strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">当您在网页中<span style="color: black;">包括</span>声音,<span style="color: black;">或</span><span style="color: black;">做为</span>网页的<span style="color: black;">构成</span>部分时,它被<span style="color: black;">叫作</span>为内联声音。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">倘若</span>您打算在 web 应用程序中<span style="color: black;">运用</span>内联声音,您需要<span style="color: black;">认识</span>到<span style="color: black;">非常多</span>人都觉得内联声音令人恼火。<span style="color: black;">同期</span>请<span style="color: black;">重视</span>,用户可能<span style="color: black;">已然</span>关闭了浏览器中的内联声音选项。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">咱们</span>最好的<span style="color: black;">意见</span>是<span style="color: black;">仅在</span>用户<span style="color: black;">期盼</span>听到内联声音的<span style="color: black;">地区</span><span style="color: black;">包括</span>它们。一个正面的例子是,在用户需要听到录音并点击某个链接时,会打开页面<span style="color: black;">而后</span>播放录音。</span></p><span style="color: black;">HTML 视频</span><span style="color: black;">
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">controls="controls">
</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">type="video/mp4" /></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">type="video/ogg" />
</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">type="video/webm" />
</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">width="320" height="240">
</p>width="320" height="240" />
</object>
</video>
</span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">运用</span> <embed> 标签</strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">下面的 HTML 代码<span style="color: black;">表示</span>嵌入网页的 Flash 视频:</span></p><span style="color: black;"><embed src=swf/"movie.swf" height="200" width="200"/></span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">问题:</strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">1)、HTML4 <span style="color: black;">没法</span>识别 <embed> 标签。您的页面<span style="color: black;">没法</span><span style="color: black;">经过</span>验证。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">2)、<span style="color: black;">倘若</span>浏览器不支持 Flash,<span style="color: black;">那样</span>视频将<span style="color: black;">没法</span>播放。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">3)、iPad 和 iPhone <span style="color: black;">不可</span><span style="color: black;">表示</span> Flash 视频。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">4)、<span style="color: black;">倘若</span>您将视频转换为其他格式,<span style="color: black;">那样</span>它仍然<span style="color: black;">不可</span>在所有浏览器中播放。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">运用</span> <object> 标签</strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><object> 标签的<span style="color: black;">功效</span>是在 HTML 页面中嵌入多<span style="color: black;">媒介</span>元素。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">下面的 HTML 代码<span style="color: black;">表示</span>嵌入网页的 Flash 视频:</span></p><span style="color: black;">height="200" width="200"/></span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">问题:</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">1)、<span style="color: black;">倘若</span>浏览器不支持 Flash,将<span style="color: black;">没法</span>播放视频。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">2)、iPad 和 iPhone <span style="color: black;">不可</span><span style="color: black;">表示</span> Flash 视频。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">3)、<span style="color: black;">倘若</span>您将视频转换为其他格式,<span style="color: black;">那样</span>它仍然<span style="color: black;">不可</span>在所有浏览器中播放。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">运用</span> <video> 标签</strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><video> 是 HTML 5 中的新标签。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><video> 标签的<span style="color: black;">功效</span>是在 HTML 页面中嵌入视频元素。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">以下 HTML 片段会<span style="color: black;">表示</span>一段嵌入网页的 ogg、mp4 或 webm 格式的视频:</span></p><span style="color: black;">
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">height="240" controls="controls">
</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">type="video/mp4" />
</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">type="video/ogg" />
</p>type="video/webm" />
Your browser does not support the video tag.
</video>
</span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">问题:</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">1)、您必须把视频转换为<span style="color: black;">非常多</span><span style="color: black;">区别</span>的格式。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">2)、<video> 元素在老式浏览器中无效。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">3)、<video> 元素<span style="color: black;">没法</span><span style="color: black;">经过</span> HTML 4 和 XHTML 验证。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">最好的 HTML <span style="color: black;">处理</span><span style="color: black;">办法</span></strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">HTML 5 + <object> + <embed></span></p><span style="color: black;">
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">height="240" controls="controls">
</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">type="video/mp4" />
</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> type="video/ogg" />
</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> type="video/webm" />
</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">width="320" height="240"></p> width="320" height="240" />
</object>
</video>
</span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">上例中<span style="color: black;">运用</span>了 4 中<span style="color: black;">区别</span>的视频格式。HTML 5 <video> 元素会尝试播放以 mp4、ogg 或 webm 格式中的一种来播放视频。<span style="color: black;">倘若</span>均失败,则回退到 <embed> 元素。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">问题:</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">1)、您必须把视频转换为<span style="color: black;">非常多</span><span style="color: black;">区别</span>的格式。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">2)、<video> 元素<span style="color: black;">没法</span><span style="color: black;">经过</span> HTML 4 和 XHTML 验证。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">3)、<embed> 元素<span style="color: black;">没法</span><span style="color: black;">经过</span> HTML 4 和 XHTML 验证。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">注释:</strong><span style="color: black;">运用</span> <!DOCTYPE html> (HTML5) <span style="color: black;">处理</span>验证问题。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">优酷<span style="color: black;">处理</span><span style="color: black;">方法</span></strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">在 HTML 中<span style="color: black;">表示</span>视频的最简单的<span style="color: black;">办法</span>是<span style="color: black;">运用</span>优酷等视频网站。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">倘若</span>您<span style="color: black;">期盼</span>在网页中播放视频,<span style="color: black;">那样</span>您<span style="color: black;">能够</span>把视频上传到优酷等视频网站,<span style="color: black;">而后</span>在您的网页中<span style="color: black;">插进</span> HTML 代码<span style="color: black;">就可</span>播放视频:</span></p><span style="color: black;"><embed src=swf/v.swf"
width="480" height="400"
type="application/x-shockwave-flash">
</embed></span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">运用</span>超链接</strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">倘若</span>网页<span style="color: black;">包括</span>指向<span style="color: black;">媒介</span>文件的超链接,大<span style="color: black;">都数</span>浏览器会<span style="color: black;">运用</span>"辅助应用程序"来播放文件。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">以下代码片段<span style="color: black;">表示</span>指向 AVI 文件的链接。<span style="color: black;">倘若</span>用户点击该链接,浏览器会<span style="color: black;">起步</span>"辅助应用程序",<span style="color: black;">例如</span> Windows Media Player 来播放这个 AVI 文件:</span></p><span style="color: black;"><a href=swf/"movie.swf">Play a video file</a></span>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">关于内联视频的一段注释</strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">当视频被<span style="color: black;">包括</span>在网页中时,它被<span style="color: black;">叫作</span>为内联视频。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">倘若</span>您打算在 web 应用程序中<span style="color: black;">运用</span>内联视频,您需要<span style="color: black;">认识</span>到<span style="color: black;">非常多</span>人都觉得内联视频令人恼火。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">同期</span>请<span style="color: black;">重视</span>,用户可能<span style="color: black;">已然</span>关闭了浏览器中的内联视频选项。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">咱们</span>最好的<span style="color: black;">意见</span>是<span style="color: black;">仅在</span>用户<span style="color: black;">期盼</span>看到内联视频的<span style="color: black;">地区</span><span style="color: black;">包括</span>它们。一个正面的例子是,在用户需要看到视频并点击某个链接时,会打开页面<span style="color: black;">而后</span>播放视频。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">关联</span><span style="color: black;">文案</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;">【教程】html+css零<span style="color: black;">基本</span>入门教程(一)</a></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;">【教程】html+css零<span style="color: black;">基本</span>入门教程(二)</a></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;">【教程】html+css零<span style="color: black;">基本</span>入门教程(三)</a></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;">【教程】html+css零<span style="color: black;">基本</span>入门教程(四)</a></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;">【教程】html+css零<span style="color: black;">基本</span>入门教程(五)</a></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;">【教程】html+css零<span style="color: black;">基本</span>入门教程(六)</a></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><a style="color: black;">【教程】html+css零<span style="color: black;">基本</span>入门教程(七)</a></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">练习题</span></strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;">1、不属于HTML视频的标签是:()</strong></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">A、<embed></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">B、<audio></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">C、<object></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">D、<video></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="https://mmbiz.qpic.cn/mmbiz_jpg/eXCSRjyNYcZKBibutcxEAbFEsAqpzGRRgvpCZUQ8iaN0q42rKVxiapXVDDia5V2MiaxVibHFAqUq2A7ENmhE1xxlJqUw/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></p>
感谢楼主分享,祝愿外链论坛越办越好!
页:
[1]