-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: add data,data-* attribute document.
- Loading branch information
1 parent
a9c5a24
commit 12f3293
Showing
1 changed file
with
32 additions
and
2 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 |
---|---|---|
@@ -1,4 +1,34 @@ | ||
data.md | ||
HTML data 属性 | ||
=== | ||
|
||
欢迎您编辑 <a target="__blank" href="https://github.com/jaywcjlove/html-tutorial/blob/main/docs/attribute/data.md">docs/attribute/data.md</a> 文件,共建 HTML Tutorial 文档。 | ||
## 定义和用法 | ||
|
||
`data` 属性指定对象要使用的资源的 URL。 | ||
|
||
## 适用于 | ||
|
||
`data` 属性可用于以下元素: | ||
|
||
| 元素 Element | 属性 Attribute | | ||
| ----- | ----- | | ||
| [\<object>](../tags/object.md) | [data](../tags/object_data.md) | | ||
|
||
## 示例 | ||
|
||
如何使用 \<object> 元素嵌入 Flash 文件: | ||
|
||
```html idoc:preview:iframe | ||
<object width="400" height="400" data="helloworld.swf"></object> | ||
``` | ||
|
||
## 浏览器支持 | ||
|
||
| 属性 Attribute | ![chrome][1] | ![edge][2] | ![firefox][3] | ![safari][4] | ![opera][5] | | ||
| ------- | --- | --- | --- | --- | --- | | ||
| data | Yes | Yes | Yes | Yes | Yes | | ||
|
||
[1]: ../assets/chrome.svg | ||
[2]: ../assets/edge.svg | ||
[3]: ../assets/firefox.svg | ||
[4]: ../assets/safari.svg | ||
[5]: ../assets/opera.svg |