描述 (Description)
embed
is a non-standard but well-supported element that’s used to embed multimedia content, including media types that mightn’t usually be natively supported by the browser. It can also be used for embedding media types that are supported, such as images in .jpg, .gif, or .png format.
embed
是用于嵌入多媒体内容的非标准但受良好支持的元素,包括浏览器本来不支持的媒体类型。 它还可以用于嵌入支持的媒体类型,例如.jpg,.gif或.png格式的图像。
embed
isn’t part of any currently recognized standard, so if you use it, your page can’t possibly validate; to create valid markup, you’ll need to use the object element, which was defined in HTML 4. That said, using embed
is widely recognised as a good way to embed Flash in an accessible manner, and many believe that it’s acceptable to compromise validity for the sake of accessibility.
embed
不属于任何当前公认的标准,因此,如果使用它,则页面可能无法验证; 要创建有效的标记,您需要使用HTML 4中定义的object元素。也就是说,使用embed
被广泛认为是一种以可访问的方式嵌入Flash的好方法,而且许多人认为妥协是可以接受的。为了可访问性的有效性。
embed
won’t work for formats that are natively supported in the browser, such as HTML and images — use the built-in, properly supported mechanisms for such formats. The formats that embed
supports are generally restricted to those that would require an additional plugin in order to work.
embed
对于浏览器本身支持的格式(例如HTML和图像)不起作用-使用内置的,正确支持的格式来处理此类格式。 embed
支持的格式通常仅限于需要其他插件才能工作的格式。
Although embed
is an empty element, an end tag is still required for the sake of browser compatibility.
尽管embed
是一个空元素,但出于浏览器兼容性的考虑,仍需要使用end标签。
例 (Example)
In this example, a super-simple embed
element is used to display a video file in .mp4 format:
在此示例中,超简单的embed
元素用于显示.mp4格式的视频文件:
<embed src="volksworld-video-report.mp4">
</embed>
将此用于… (Use This for…)
This element is used for media files (primarily movie files, such as Flash and QuickTime video).
此元素用于媒体文件(主要是电影文件,例如Flash和QuickTime视频)。
在这个部分 (In this Section)
-
alignment/position of the embed content relative to surrounding content
嵌入内容相对于周围内容的对齐/位置
-
alternative text for embed content
嵌入内容的替代文字
-
sets border thickness around the embed content
设置嵌入内容周围的边框厚度
-
sets the embed content’s height
设置嵌入内容的高度
-
Sets the embed content to be invisible
将嵌入内容设置为不可见
-
sets amount of space horizontally (either side) for the embedded content
设置嵌入内容的水平空间(两侧)
-
name for referencing the embed element by
引用embed元素的名称
-
defines the location for required plug-in
定义所需插件的位置
-
defines the MIME type for the embed content
定义嵌入内容的MIME类型
-
sets amount of space vertically (top and bottom) for the object
设置对象的垂直空间(顶部和底部)