HTML 5 <details> 標(biāo)簽
定義和用法
<details> 標(biāo)簽定義元素的細(xì)節(jié),用戶可進行查看,或通過點擊進行隱藏。
HTML 4.01 與 HTML 5 之間的差異
<details> 標(biāo)簽是 HTML 5 中的新標(biāo)簽。
提示和注釋
提示:與 <legend> 一起使用,來制作 detail 的標(biāo)題。該標(biāo)題對用戶是可見的,當(dāng)在其上點擊時可打開或關(guān)閉 detail。
屬性
屬性 | 值 | 描述 |
---|---|---|
open | true | false | 定義 details 是否可見。默認(rèn)是 false。 |
標(biāo)準(zhǔn)屬性
class, contenteditable, contextmenu, dir, draggable, id, irrelevant, lang, ref, registrationmark, tabindex, template, title
如需完整的描述,請訪 HTML 5 中標(biāo)準(zhǔn)屬性。
事件屬性
onabort, onbeforeunload, onblur, onchange, onclick, oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress, onkeyup, onload, onmessage, onmousedown, onmousemove, onmouseover, onmouseout, onmouseup, onmousewheel, onresize, onscroll, onselect, onsubmit, onunload
如需完整的描述,請訪 HTML 5 中事件屬性。