新聞中心
介紹

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 - 指定需要應(yīng)用的 css 類(lèi)選擇器element/_globalAttributes/class.html
class - webabcd
4、title - 用于描述元素信息,相當(dāng)于 ToolTipelement/_globalAttributes/title.html
title - webabcd blog
![]()
#p#
5、tabindex - 用于定義 TAB 鍵的導(dǎo)航順序(整型值)element/_globalAttributes/tabindex.html
tabindex
6、id - 用于定義元素的唯一標(biāo)識(shí),主要給 DOM 用element/_globalAttributes/id.html
id - webabcd blog
7、dir - 文本排列方向,可能的值有:auto|ltr|rtl(dir 是 direction 的縮寫(xiě))element/_globalAttributes/dir.html
dir - 123
8、spellcheck - 是否使用瀏覽器的拼寫(xiě)檢查功能對(duì)元素內(nèi)的內(nèi)容做拼寫(xiě)檢查element/_globalAttributes/spellcheck.html
spellcheck - i am jack, i am webabcd, haha, good, hehe
#p#
9、hidden - 用于隱藏元素(不占位)element/_globalAttributes/hidden.html
hidden
10、contenteditable - 用于定義內(nèi)容是否可編輯element/_globalAttributes/contenteditable.html
contenteditable 我是可以編輯的,試試看
11、contextmenu - 指定上下文菜單的數(shù)據(jù)源element/_globalAttributes/contextmenu.html
12、draggable - 元素是否可拖拽;dropzone - 拖放的目標(biāo)元素(可承載被拖拽元素的元素)element/_globalAttributes/draggable_dropzone.html
draggable dropzone - 關(guān)于 draggable 和 dropzone 的詳細(xì)說(shuō)明,參見(jiàn) /other/drag_drop
[源碼下載]
原文鏈接:http://www.cnblogs.com/webabcd/archive/2012/02/02/2335318.html
分享標(biāo)題:HTML5深入淺出教學(xué)篇之五
文章起源:http://m.fisionsoft.com.cn/article/dhssdjg.html


咨詢(xún)
建站咨詢(xún)
