过时
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 Directory element
(
<dir>
) is used as a container for a directory of files and/or folders, potentially with styles and icons applied by the
用户代理
.
Do not use this obsolete element; instead, you should use the
<ul>
element for lists, including lists of files.
This element implements the
HTMLDirectoryElement
接口。
Like all other HTML elements, this element supports the 全局属性 .
compact
<dir>
element should be styled using
CSS
. To give a similar effect as that achieved with the
compact
attribute, the
CSS
property
line-height
can be used with a value of
80%
.
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
dir
弃用
|
Chrome 不支持 No | Edge 不支持 No | Firefox 不支持 No | IE 不支持 No | Opera 不支持 No | Safari 不支持 No | WebView Android 不支持 No | Chrome Android 不支持 No | Firefox Android 不支持 No | Opera Android 不支持 No | Safari iOS 不支持 No | Samsung Internet Android 不支持 No |
compact
弃用
|
Chrome 不支持 No | Edge 不支持 No | Firefox 不支持 No | IE 不支持 No | Opera 不支持 No | Safari 不支持 No | WebView Android 不支持 No | Chrome Android 不支持 No | Firefox Android 不支持 No | Opera Android 不支持 No | Safari iOS 不支持 No | Samsung Internet Android 不支持 No |
不支持
弃用。不要用于新网站。
<ol>
,
<ul>
,
<li>
,和
<menu>
;
<dir>
元素:
list-style
property, useful to choose the way the ordinal is displayed.
line-height
property, useful to simulate the deprecated
compact
属性。
margin
property, useful to control the indent of the list.
<dir>