HTML <details> 標籤
實例
使用<details> 元素:
<details>
<summary>Copyright 1999-2011.</summary>
<p> - by Refsnes Data. All Rights Reserved.</p>
<p>All content and graphics on this web site are the property of the company Refsnes Data.</p>
</details>
<summary>Copyright 1999-2011.</summary>
<p> - by Refsnes Data. All Rights Reserved.</p>
<p>All content and graphics on this web site are the property of the company Refsnes Data.</p>
</details>
嘗試一下»
瀏覽器支持
目前,只有Chrome 和Safari 6 支持<details> 標籤。
標籤定義及使用說明
<details> 標籤規定了用戶可見的或者隱藏的需求的補充細節。
<details> 標籤用來供用戶開啟關閉的交互式控件。 任何形式的內容都能被放在<details> 標籤裡邊。
<details> 元素的內容對用戶是不可見的,除非設置了open 屬性。
HTML 4.01 與HTML5之間的差異
<details> 標籤是HTML5 中的新標籤。
提示和註釋
提示:與<summary>標籤配合使用可以為details定義標題。標題是可見的,用戶點擊標題時,會顯示出details。
屬性
New :HTML5中的新屬性。
属性 | 值 | 描述 |
---|---|---|
open New | open | 规定 details 是否可见。 |
全局屬性
<details>標籤支持HTML的全局屬性 。
事件屬性
<details>標籤支持HTML的事件屬性 。