扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
介绍
HTML 5: 元素的通用属性
元素的通用属性 - accesskey, style, class, title, tabindex, id, dir, spellcheck, hidden, contenteditable, contextmenu, draggable, dropzone
示例
1、accesskey - 用于定义快捷键element/_globalAttributes/accesskey.html
accesskey - webabcd blog
- webabcd blog
2、style - 用于定义样式element/_globalAttributes/style.html
style - webabcd
3、class - 指定需要应用的 css 类选择器element/_globalAttributes/class.html
class - webabcd
4、title - 用于描述元素信息,相当于 ToolTipelement/_globalAttributes/title.html
title - webabcd blog
![]()
#p#
5、tabindex - 用于定义 TAB 键的导航顺序(整型值)element/_globalAttributes/tabindex.html
tabindex
6、id - 用于定义元素的唯一标识,主要给 DOM 用element/_globalAttributes/id.html
id - webabcd blog
7、dir - 文本排列方向,可能的值有:auto|ltr|rtl(dir 是 direction 的缩写)element/_globalAttributes/dir.html
dir - 123
8、spellcheck - 是否使用浏览器的拼写检查功能对元素内的内容做拼写检查element/_globalAttributes/spellcheck.html
spellcheck - i am jack, i am webabcd, haha, good, hehe
#p#
9、hidden - 用于隐藏元素(不占位)element/_globalAttributes/hidden.html
hidden
10、contenteditable - 用于定义内容是否可编辑element/_globalAttributes/contenteditable.html
contenteditable 我是可以编辑的,试试看
11、contextmenu - 指定上下文菜单的数据源element/_globalAttributes/contextmenu.html
12、draggable - 元素是否可拖拽;dropzone - 拖放的目标元素(可承载被拖拽元素的元素)element/_globalAttributes/draggable_dropzone.html
draggable dropzone - 关于 draggable 和 dropzone 的详细说明,参见 /other/drag_drop
[源码下载]
原文链接:http://www.cnblogs.com/webabcd/archive/2012/02/02/2335318.html
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流