嵌入(HTML元素)

描述 (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)

  • align

    对齐

    alignment/position of the embed content relative to surrounding content

    嵌入内容相对于周围内容的对齐/位置

  • alt

    alt

    alternative text for embed content

    嵌入内容的替代文字

  • border

    边境

    sets border thickness around the embed content

    设置嵌入内容周围的边框厚度

  • height

    高度

    sets the embed content’s height

    设置嵌入内容的高度

  • hidden

    Sets the embed content to be invisible

    将嵌入内容设置为不可见

  • hspace

    时空

    sets amount of space horizontally (either side) for the embedded content

    设置嵌入内容的水平空间(两侧)

  • name

    名称

    name for referencing the embed element by

    引用embed元素的名称

  • pluginspage

    插件页面

    defines the location for required plug-in

    定义所需插件的位置

  • type

    类型

    defines the MIME type for the embed content

    定义嵌入内容的MIME类型

  • vspace

    虚拟空间

    sets amount of space vertically (top and bottom) for the object

    设置对象的垂直空间(顶部和底部)

翻译自: https://www.sitepoint.com/embed-html-element/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值