HTML 5 <details> 標(biāo)簽
定義和用法
<details> 標(biāo)簽定義元素的細(xì)節(jié),用戶可進(jìn)行查看,或通過(guò)點(diǎn)擊進(jìn)行隱藏。
HTML 4.01 與 HTML 5 之間的差異
<details> 標(biāo)簽是 HTML 5 中的新標(biāo)簽。
提示和注釋
提示:與 <legend> 一起使用,來(lái)制作 detail 的標(biāo)題。該標(biāo)題對(duì)用戶是可見(jiàn)的,當(dāng)在其上點(diǎn)擊時(shí)可打開(kāi)或關(guān)閉 detail。
屬性
屬性 | 值 | 描述 |
---|---|---|
open | true | false | 定義 details 是否可見(jiàn)。默認(rèn)是 false。 |
標(biāo)準(zhǔn)屬性
class, contenteditable, contextmenu, dir, draggable, id, irrelevant, lang, ref, registrationmark, tabindex, template, title
如需完整的描述,請(qǐng)?jiān)L 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
如需完整的描述,請(qǐng)?jiān)L HTML 5 中事件屬性。