介绍
HTML 5: 元素的通用属性
- 元 素的通用属性 - accesskey, style, class, title, tabindex, id, dir, spellcheck, hidden, contenteditable, contextmenu, draggable, dropzone
示例
1、accesskey - 用于定义快捷键
element/_globalAttributes/accesskey.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
2、style - 用于定义样式
element/_globalAttributes/style.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
3、class - 指定需要应用的 css 类选择器
element/_globalAttributes/class.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
4、title - 用于描述元素信息,相当于 ToolTip
element/_globalAttributes/title.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
5、tabindex - 用于定义 TAB 键的导航顺序(整型值)
element/_globalAttributes/tabindex.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|
6、id - 用于定义元素的唯一标识,主要给 DOM 用
element/_globalAttributes/id.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
7、dir - 文本排列方向,可能的值有:auto|ltr|rtl(dir 是 direction 的缩写)
element/_globalAttributes/dir.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
8、spellcheck - 是否使用浏览器的拼写检查功能对元素内的内容做拼写检查
element/_globalAttributes/spellcheck.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
9、hidden - 用于隐藏元素(不占位)
element/_globalAttributes/hidden.html
发表回复