Skip to content

Commit 507edc1

Browse files
committed
doc: add embed_height,embed_src,embed_type,embed_width document.
1 parent 66cdd29 commit 507edc1

File tree

5 files changed

+165
-8
lines changed

5 files changed

+165
-8
lines changed

docs/tags/embed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ HTML \<embed> 标签
5858
| [src](./embed_src.md) | *URL* | 指定要嵌入的外部文件的地址 |
5959
| [type](./embed_type.md) | *media\_type* | 指定嵌入内容的媒体类型 |
6060
| [width](./embed_width.md) | *pixels* | 指定嵌入内容的宽度 |
61+
<!--rehype:style=width: 100%; display: inline-table;-->
6162

6263
## 全局属性
6364

docs/tags/embed_height.md

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,47 @@
1-
embed_height.md
1+
HTML \<embed> height 属性
22
===
33

4-
欢迎您编辑 <a target="__blank" href="https://github.com/jaywcjlove/html-tutorial/blob/main/docs/tags/embed_height.md">docs/tags/embed_height.md</a> 文件,共建 HTML Tutorial 文档。
4+
## 示例
5+
6+
一张高宽均为 200 像素的图片:
7+
8+
```html idoc:preview:iframe
9+
<embed
10+
src="../assets/editors-006.png"
11+
width="200"
12+
height="200"
13+
>
14+
```
15+
<!--rehype:style=min-height: 200px;-->
16+
17+
## 定义和用法
18+
19+
`height` 属性指定嵌入内容的高度,以像素为单位。
20+
21+
**提示:** 使用 `width` 属性指定嵌入内容的宽度。
22+
23+
## 浏览器支持
24+
25+
| 属性 Attribute | ![chrome][1] | ![edge][2] | ![firefox][3] | ![safari][4] | ![opera][5] |
26+
| ---- | ---- | ---- | ---- | ---- | ---- |
27+
| height | Yes | Yes | Yes | Yes | Yes |
28+
<!--rehype:style=width: 100%; display: inline-table;-->
29+
30+
## 语法
31+
32+
```html
33+
<embed height="pixels">
34+
```
35+
36+
## 属性值
37+
38+
| 值 Value | 描述 Description |
39+
| ----- | ----- |
40+
| *pixels* | 嵌入内容的高度,以像素为单位(即 `height="100"`|
41+
<!--rehype:style=width: 100%; display: inline-table;-->
42+
43+
[1]: ../assets/chrome.svg
44+
[2]: ../assets/edge.svg
45+
[3]: ../assets/firefox.svg
46+
[4]: ../assets/safari.svg
47+
[5]: ../assets/opera.svg

docs/tags/embed_src.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,43 @@
1-
embed_src.md
1+
HTML \<embed> src 属性
22
===
33

4-
欢迎您编辑 <a target="__blank" href="https://github.com/jaywcjlove/html-tutorial/blob/main/docs/tags/embed_src.md">docs/tags/embed_src.md</a> 文件,共建 HTML Tutorial 文档。
4+
## 示例
5+
6+
嵌入图片:
7+
8+
```html idoc:preview:iframe
9+
<embed
10+
src="../assets/editors-006.png"
11+
>
12+
```
13+
<!--rehype:style=min-height: 200px;-->
14+
15+
## 定义和用法
16+
17+
`src` 属性指定要嵌入的外部文件的地址。
18+
19+
## 浏览器支持
20+
21+
| 属性 Attribute | ![chrome][1] | ![edge][2] | ![firefox][3] | ![safari][4] | ![opera][5] |
22+
| ---- | ---- | ---- | ---- | ---- | ---- |
23+
| src | Yes | Yes | Yes | Yes | Yes |
24+
<!--rehype:style=width: 100%; display: inline-table;-->
25+
26+
## 语法
27+
28+
```html
29+
<embed src="URL">
30+
```
31+
32+
## 属性值
33+
34+
| 值 Value | 描述 Description |
35+
| ----- | ----- |
36+
| *URL* | 指定要嵌入的外部文件的地址。可能的值:<br>* 绝对 URL - 指向另一个网站(如 `href="http://www.example.com/hello.swf"`) <br>* 相对 URL - 指向网站内的文件(如 `href="hello.swf"`|
37+
<!--rehype:style=width: 100%; display: inline-table;-->
38+
39+
[1]: ../assets/chrome.svg
40+
[2]: ../assets/edge.svg
41+
[3]: ../assets/firefox.svg
42+
[4]: ../assets/safari.svg
43+
[5]: ../assets/opera.svg

docs/tags/embed_type.md

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,46 @@
1-
embed_type.md
1+
HTML \<embed> type 属性
22
===
33

4-
欢迎您编辑 <a target="__blank" href="https://github.com/jaywcjlove/html-tutorial/blob/main/docs/tags/embed_type.md">docs/tags/embed_type.md</a> 文件,共建 HTML Tutorial 文档。
4+
## 示例
5+
6+
具有指定媒体类型的图片:
7+
8+
```html idoc:preview:iframe
9+
<embed
10+
type="image/png"
11+
src="../assets/editors-006.png"
12+
>
13+
```
14+
<!--rehype:style=min-height: 200px;-->
15+
16+
## 定义和用法
17+
18+
`type` 属性指定嵌入内容的 Internet 媒体类型(以前称为 MIME 类型)。
19+
20+
## 浏览器支持
21+
22+
| 属性 Attribute | ![chrome][1] | ![edge][2] | ![firefox][3] | ![safari][4] | ![opera][5] |
23+
| ---- | ---- | ---- | ---- | ---- | ---- |
24+
| type | Yes | Yes | Yes | Yes | Yes |
25+
<!--rehype:style=width: 100%; display: inline-table;-->
26+
27+
28+
## 语法
29+
30+
```html
31+
<embed type="media_type">
32+
```
33+
34+
## 属性值
35+
36+
| 值 Value | 描述 Description |
37+
| ----- | ----- |
38+
| *media\_type* | 嵌入内容的 Internet 媒体类型。 查看 [IANA 媒体类型](http://www.iana.org/assignments/media-types/) 以获取标准媒体类型的完整列表。 |
39+
<!--rehype:style=width: 100%; display: inline-table;-->
40+
41+
[1]: ../assets/chrome.svg
42+
[2]: ../assets/edge.svg
43+
[3]: ../assets/firefox.svg
44+
[4]: ../assets/safari.svg
45+
[5]: ../assets/opera.svg
46+

docs/tags/embed_width.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,36 @@
1-
embed_width.md
1+
HTML \<embed> width 属性
22
===
33

4-
欢迎您编辑 <a target="__blank" href="https://github.com/jaywcjlove/html-tutorial/blob/main/docs/tags/embed_width.md">docs/tags/embed_width.md</a> 文件,共建 HTML Tutorial 文档。
4+
## 示例
5+
6+
一张高宽均为 200 像素的图片:
7+
8+
```html idoc:preview:iframe
9+
<embed src="../assets/editors-006.png" width="200" height="200">
10+
```
11+
12+
## 定义和用法
13+
14+
`width` 属性指定嵌入内容的宽度,以像素为单位。
15+
16+
**提示:** 使用 `height` 属性指定嵌入内容的高度。
17+
18+
## 浏览器支持
19+
20+
| 属性 Attribute | ![chrome][1] | ![edge][2] | ![firefox][3] | ![safari][4] | ![opera][5] |
21+
| ---- | ---- | ---- | ---- | ---- | ---- |
22+
| width | Yes | Yes | Yes | Yes | Yes |
23+
<!--rehype:style=width: 100%; display: inline-table;-->
24+
25+
## 语法
26+
27+
```html
28+
<embed width="pixels">
29+
```
30+
31+
## 属性值
32+
33+
| 值 Value | 描述 Description |
34+
| ----- | ----- |
35+
| *pixels* | 嵌入内容的宽度,以像素为单位(即 width="100") |
36+
<!--rehype:style=width: 100%; display: inline-table;-->

0 commit comments

Comments
 (0)