-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[zh-cn]: create docs for HTMLEmbedElement (#23080)
Co-authored-by: A1lo <[email protected]>
- Loading branch information
Showing
4 changed files
with
171 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
title: HTMLEmbedElement:height 属性 | ||
slug: Web/API/HTMLEmbedElement/height | ||
l10n: | ||
sourceCommit: d8a52569d8d465eb626af3d33600c8c638a7a322 | ||
--- | ||
|
||
{{APIRef("HTML DOM")}} | ||
|
||
{{domxref("HTMLEmbedElement")}} 接口的 **`height`** 属性返回一个反映 {{HTMLElement("embed")}} 元素的 `height` 属性的字符串,其以 CSS 像素为单位指示资源的显示高度。 | ||
|
||
## 值 | ||
|
||
一个字符串,以 CSS 像素为单位指示资源的显示高度。 | ||
|
||
## 示例 | ||
|
||
```html | ||
<embed id="el" width="800" height="600" /> | ||
``` | ||
|
||
```js | ||
const el = document.getElementById("el"); | ||
console.log(el.height); // 输出:“600” | ||
``` | ||
|
||
## 规范 | ||
|
||
{{Specifications}} | ||
|
||
## 浏览器兼容性 | ||
|
||
{{Compat}} | ||
|
||
## 参见 | ||
|
||
- {{domxref("HTMLCanvasElement.height")}} | ||
- {{domxref("HTMLIFrameElement.height")}} | ||
- {{domxref("HTMLImageElement.height")}} | ||
- {{domxref("HTMLObjectElement.height")}} | ||
- {{domxref("HTMLSourceElement.height")}} | ||
- {{domxref("HTMLVideoElement.height")}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
title: HTMLEmbedElement | ||
slug: Web/API/HTMLEmbedElement | ||
l10n: | ||
sourceCommit: e9e2ec643ac69c132f31427a0b586ab2cf83ed58 | ||
--- | ||
|
||
{{APIRef("HTML DOM")}} | ||
|
||
**`HTMLEmbedElement`** 接口提供了用于操作 {{HTMLElement("embed")}} 元素的特殊属性(除了常规 {{domxref("HTMLElement")}} 接口之外,它还可以通过继承来使用)。 | ||
|
||
> [!NOTE] | ||
> 本主题描述标准定义中的 `HTMLEmbedElement` 接口。它没有解决早期非标准化版本的接口问题。 | ||
{{InheritanceDiagram}} | ||
|
||
## 实例属性 | ||
|
||
_从其父接口 {{domxref("HTMLElement")}} 继承属性。_ | ||
|
||
- {{domxref("HTMLEmbedElement.align")}} {{deprecated_inline}} | ||
- : 表示枚举属性的字符串,指示元素内容相对于周围上下文的对齐方式。可能的值有:`"left"`、`"right"`、`"center"` 和 `"justify"`。 | ||
- {{domxref("HTMLEmbedElement.height")}} | ||
- : 一个反映 [`height`](/zh-CN/docs/Web/HTML/Element/embed#height) HTML 属性的字符串,包含资源显示的高度。 | ||
- {{domxref("HTMLEmbedElement.name")}} {{deprecated_inline}} | ||
- : 一个表示嵌入对象名字的字符串。 | ||
- {{domxref("HTMLEmbedElement.src")}} | ||
- : 一个反映 [`src`](/zh-CN/docs/Web/HTML/Element/embed#src) HTML 属性的字符串,包含资源地址。 | ||
- {{domxref("HTMLEmbedElement.type")}} | ||
- : 一个反映 [`type`](/zh-CN/docs/Web/HTML/Element/embed#type) HTML 属性的字符串,包含资源类型。 | ||
- {{domxref("HTMLEmbedElement.width")}} | ||
- : 一个反映 [`width`](/zh-CN/docs/Web/HTML/Element/embed#width) HTML 属性的字符串,包含资源的显示宽度。 | ||
|
||
## 实例方法 | ||
|
||
_无特定方法;从其父接口 {{domxref("HTMLElement")}} 继承方法。_ | ||
|
||
## 规范 | ||
|
||
{{Specifications}} | ||
|
||
## 浏览器兼容性 | ||
|
||
{{Compat}} | ||
|
||
## 参见 | ||
|
||
- 实现此接口的 HTML 元素:{{HTMLElement("embed")}}。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
title: HTMLEmbedElement:src 属性 | ||
slug: Web/API/HTMLEmbedElement/src | ||
l10n: | ||
sourceCommit: a0460b9c26f5ad9b8bbc9cc569f4fdd8058aec8f | ||
--- | ||
|
||
{{APIRef("HTML DOM")}} | ||
|
||
{{domxref("HTMLEmbedElement")}} 接口的 **`src`** 属性返回一个指示嵌入资源的 URL 字符串。它反映 {{HTMLElement("embed")}} 元素的 `src` 属性。 | ||
|
||
## 值 | ||
|
||
一个字符串。 | ||
|
||
## 示例 | ||
|
||
```html | ||
<embed | ||
id="el" | ||
type="video/quicktime" | ||
src="movie.mov" | ||
width="640" | ||
height="480" | ||
title="视频标题" /> | ||
``` | ||
|
||
```js | ||
const el = document.getElementById("el"); | ||
console.log(el.src); // 输出:“movie.mov” | ||
``` | ||
|
||
## 规范 | ||
|
||
{{Specifications}} | ||
|
||
## 浏览器兼容性 | ||
|
||
{{Compat}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
title: HTMLEmbedElement:width 属性 | ||
slug: Web/API/HTMLEmbedElement/width | ||
l10n: | ||
sourceCommit: d8a52569d8d465eb626af3d33600c8c638a7a322 | ||
--- | ||
|
||
{{APIRef("HTML DOM")}} | ||
|
||
{{domxref("HTMLEmbedElement")}} 接口的 **`width`** 属性返回一个反映 {{HTMLElement("embed")}} 元素的 `width` 属性的字符串,其以 CSS 像素为单位指示资源的显示宽度。 | ||
|
||
## 值 | ||
|
||
一个字符串,以 CSS 像素为单位指示资源的显示宽度。 | ||
|
||
## 示例 | ||
|
||
```html | ||
<embed id="el" width="800" height="600" /> | ||
``` | ||
|
||
```js | ||
const el = document.getElementById("el"); | ||
console.log(el.width); // 输出:“800” | ||
``` | ||
|
||
## 规范 | ||
|
||
{{Specifications}} | ||
|
||
## 浏览器兼容性 | ||
|
||
{{Compat}} | ||
|
||
## 参见 | ||
|
||
- {{domxref("HTMLCanvasElement.width")}} | ||
- {{domxref("HTMLIFrameElement.width")}} | ||
- {{domxref("HTMLImageElement.width")}} | ||
- {{domxref("HTMLObjectElement.width")}} | ||
- {{domxref("HTMLSourceElement.width")}} | ||
- {{domxref("HTMLVideoElement.width")}} |