Skip to content

Commit 3e10b45

Browse files
committed
doc: add base_href, base_target document.
1 parent 8d8b2f5 commit 3e10b45

File tree

5 files changed

+119
-6
lines changed

5 files changed

+119
-6
lines changed

docs/tags/area_shape.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ HTML \<area> shape 属性
2626
| 属性 Attribute | ![chrome][1] | ![edge][2] | ![firefox][3] | ![safari][4] | ![opera][5] |
2727
| ---- | ---- | ---- | ---- | ---- | ---- |
2828
| shape | Yes | Yes | Yes | Yes | Yes |
29+
<!--rehype:style=width: 100%; display: inline-table;-->
2930

3031
## 语法
3132

@@ -41,3 +42,10 @@ HTML \<area> shape 属性
4142
| rect | Defines a rectangular region |
4243
| circle | Defines a circular region |
4344
| poly | Defines a polygonal region |
45+
<!--rehype:style=width: 100%; display: inline-table;-->
46+
47+
[1]: ../assets/chrome.svg
48+
[2]: ../assets/edge.svg
49+
[3]: ../assets/firefox.svg
50+
[4]: ../assets/safari.svg
51+
[5]: ../assets/opera.svg

docs/tags/area_target.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ HTML \<area> target 属性
2626
| 属性 | ![chrome][1] | ![edge][2] | ![firefox][3] | ![safari][4] | ![opera][5] |
2727
| ---- | ---- | ---- | ---- | ---- | ---- |
2828
| target | Yes | Yes | Yes | Yes | Yes |
29+
<!--rehype:style=width: 100%; display: inline-table;-->
2930

3031
## 语法
3132

@@ -41,4 +42,10 @@ HTML \<area> target 属性
4142
| \_self | 在单击时在同一框架中打开链接的文档 |
4243
| \_parent | 在父框架中打开链接的文档 |
4344
| \_top | 在整个窗口中打开链接的文档 |
44-
| *framename* | 在命名的 iframe 中打开链接的文档 |
45+
| *framename* | 在命名的 iframe 中打开链接的文档 |<!--rehype:style=width: 100%; display: inline-table;-->
46+
47+
[1]: ../assets/chrome.svg
48+
[2]: ../assets/edge.svg
49+
[3]: ../assets/firefox.svg
50+
[4]: ../assets/safari.svg
51+
[5]: ../assets/opera.svg

docs/tags/area_type.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ HTML \<area> type 属性
2626
| 属性 | ![chrome][1] | ![edge][2] | ![firefox][3] | ![safari][4] | ![opera][5] |
2727
| ---- | ---- | ---- | ---- | ---- | ---- |
2828
| type | Yes | Yes | Yes | Yes | Yes |
29+
<!--rehype:style=width: 100%; display: inline-table;-->
2930

3031
## 语法
3132

@@ -37,4 +38,11 @@ HTML \<area> type 属性
3738

3839
| 值 Value | 描述 Description |
3940
| ----- | ----- |
40-
| *media\_type* | 链接文档的 Internet 媒体类型。 查看 [IANA 媒体类型](http://www.iana.org/assignments/media-types/) 以获取标准媒体类型的完整列表。 |
41+
| *media\_type* | 链接文档的 Internet 媒体类型。 查看 [IANA 媒体类型](http://www.iana.org/assignments/media-types/) 以获取标准媒体类型的完整列表。 |
42+
<!--rehype:style=width: 100%; display: inline-table;-->
43+
44+
[1]: ../assets/chrome.svg
45+
[2]: ../assets/edge.svg
46+
[3]: ../assets/firefox.svg
47+
[4]: ../assets/safari.svg
48+
[5]: ../assets/opera.svg

docs/tags/base_href.md

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

4-
欢迎您编辑 <a target="__blank" href="https://github.com/jaywcjlove/html-tutorial/blob/main/docs/tags/base_href.md">docs/tags/base_href.md</a> 文件,共建 HTML Tutorial 文档。
4+
## 示例
5+
6+
为页面上的所有相对 URL 指定一个基本 URL:
7+
8+
```html idoc:preview:iframe
9+
<head>
10+
<base href="https://wangchujiang.com/" target="_blank">
11+
</head>
12+
<body>
13+
<img src="html-tutorial/assets/chrome.svg" width="24" height="39" alt="chrome"> 请注意,我们只为图像指定了一个相对地址。 由于我们在 head 部分指定了基本 URL,浏览器将在“https://wangchujiang.com/html-tutorial/assets/chrome.svg”中查找图像。
14+
<div>
15+
<a href="html-tutorial/tags/head.html">HTML base Tag</a> 注意,这个超链接,将在新窗口打开 ”https://wangchujiang.com/html-tutorial/tags/head.html“
16+
</div>
17+
</body>
18+
```
19+
20+
## 定义和用法
21+
22+
`href` 属性指定页面上所有相对 URL 的基本 URL。
23+
24+
## 浏览器支持
25+
26+
| 属性 Attribute | ![chrome][1] | ![edge][2] | ![firefox][3] | ![safari][4] | ![opera][5] |
27+
| ---- | ---- | ---- | ---- | ---- | ---- |
28+
| href | Yes | Yes | Yes | Yes | Yes |
29+
<!--rehype:style=width: 100%; display: inline-table;-->
30+
31+
## 语法
32+
33+
```html
34+
<base href="URL">
35+
```
36+
37+
| 值 Value | 描述 Description |
38+
| ----- | ----- |
39+
| *URL* | 充当基本 URL 的绝对 URL(如“http://www.example.com/”) |
40+
<!--rehype:style=width: 100%; display: inline-table;-->
41+
42+
[1]: ../assets/chrome.svg
43+
[2]: ../assets/edge.svg
44+
[3]: ../assets/firefox.svg
45+
[4]: ../assets/safari.svg
46+
[5]: ../assets/opera.svg

docs/tags/base_target.md

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,52 @@
1-
base_target.md
1+
HTML \<base> target 属性
22
===
33

4-
欢迎您编辑 <a target="__blank" href="https://github.com/jaywcjlove/html-tutorial/blob/main/docs/tags/base_target.md">docs/tags/base_target.md</a> 文件,共建 HTML Tutorial 文档。
4+
## 示例
5+
6+
为页面上的所有超链接和表单指定默认目标:
7+
8+
```html idoc:preview:iframe
9+
<head>
10+
<base href="https://wangchujiang.com/" target="_blank">
11+
</head>
12+
<body>
13+
<div>
14+
<a href="html-tutorial/tags/head.html">HTML base Tag</a> 注意,这个超链接,将在新窗口打开 ”https://wangchujiang.com/html-tutorial/tags/head.html“ </div>
15+
</body>
16+
```
17+
18+
## 定义和用法
19+
20+
`target` 属性指定页面中所有超链接和表单的默认目标。
21+
22+
此属性可以通过使用每个超链接/表单的“目标”属性来覆盖。
23+
24+
## 浏览器支持
25+
26+
| 属性 | ![chrome][1] | ![edge][2] | ![firefox][3] | ![safari][4] | ![opera][5] |
27+
| ---- | ---- | ---- | ---- | ---- | ---- |
28+
| target | Yes | Yes | Yes | Yes | Yes |
29+
<!--rehype:style=width: 100%; display: inline-table;-->
30+
31+
## 语法
32+
33+
```html
34+
<base target="_blank|_self|_parent|_top">
35+
```
36+
37+
## 属性值
38+
39+
| 值 Value | 描述 Description |
40+
| ----- | ----- |
41+
| \_blank | 在新窗口或选项卡中打开链接 |
42+
| \_self | 默认。 在单击时在同一框架中打开链接 |
43+
| \_parent | 在父框架中打开链接 |
44+
| \_top | 在整个窗口中打开链接 |
45+
<!--rehype:style=width: 100%; display: inline-table;-->
46+
47+
48+
[1]: ../assets/chrome.svg
49+
[2]: ../assets/edge.svg
50+
[3]: ../assets/firefox.svg
51+
[4]: ../assets/safari.svg
52+
[5]: ../assets/opera.svg

0 commit comments

Comments
 (0)