<dir>:目录元素(已废弃)
已废弃
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
已废弃的 HTML 目录元素(<dir>
)被作为一个文件和/或文件夹的目录的容器,可能还有 用户代理 应用的样式与图标。 Do not use this obsolete element; instead, you should use the <ul>
element for lists, including lists of files.
DOM 接口
元素实现了 HTMLDirectoryElement
接口。
属性
就像其它 HTML 元素,这个元素支持 全局属性。
compact
- 这个布尔属性表明,列表应该以紧凑样式显示。这个属性的实现取决于浏览器,并且不在所有浏览器中工作。
另见
- 其它和列表相关的 HTML 元素:
<ol>
,<ul>
,<li>
,<menu>
; - 特定用于
<dir>
元素的 CSS 属性:list-style
属性,用于选择序号展示的方式。- CSS 计数器,用于处理复杂的嵌套列表。
line-height
属性,用于模拟废除的compact
属性。.margin
属性,用于控制列表的缩进。