非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。
-moz-user-focus
CSS
property is used to indicate whether an element can have the focus.
/* Keyword values */ -moz-user-focus: normal; -moz-user-focus: ignore; /* Global values */ -moz-user-focus: inherit; -moz-user-focus: initial; -moz-user-focus: unset;
By setting its value to
ignore
, you can disable focusing the element, which means that the user will not be able to activate the element. The element will be skipped in the tab sequence.
| 初始值 |
none
|
|---|---|
| 适用于 | 所有元素 |
| 继承 | no |
| 计算值 | 如指定 |
| 动画类型 | discrete |
<xul:textbox>
elements, because the
textbox
itself never takes focus. Instead, XBL creates an anonymous HTML
<input>
element inside the
textbox
, and that element is what receives focus. You can stop the
textbox
from taking keyboard focus by setting its tab index to
-1
, and from taking mouse focus by preventing the default action of
mousedown
事件。
ignore
The element does not accept the keyboard focus and will be skipped in the tab order.
normal
The element can accept the keyboard focus.
select-after
?
select-before
?
select-menu
?
select-same
?
select-all
?
none
?
| 初始值 |
none
|
|---|---|
| 适用于 | 所有元素 |
| 继承 | no |
| 计算值 | 如指定 |
| 动画类型 | discrete |
ignore | normal | select-after | select-before | select-menu | select-same | select-all | none
<input class="ignored" value="The user cannot focus on this element.">
.ignored {
-moz-user-focus: ignore;
}
Not part of any standard. A similar property,
user-focus
, was proposed in
early drafts of a predecessor of the CSS3 UI specification
, but was rejected by the working group.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-moz-user-focus
非标
|
Chrome 不支持 No | Edge 不支持 No | Firefox 完整支持 1 | IE 不支持 No | Opera 不支持 No | Safari 不支持 No | WebView Android 不支持 No | Chrome Android 不支持 No | Firefox Android 完整支持 4 | Opera Android 不支持 No | Safari iOS 不支持 No | Samsung Internet Android 不支持 No |
完整支持
不支持
非标。预期跨浏览器支持较差。
-moz-context-properties
-moz-float-edge
-moz-force-broken-image-icon
-moz-image-region
-moz-orient
-moz-outline-radius
-moz-outline-radius-bottomleft
-moz-outline-radius-bottomright
-moz-outline-radius-topleft
-moz-outline-radius-topright
-moz-user-focus
-moz-user-input
box-align
box-direction
box-flex
box-flex-group
box-lines
box-ordinal-group
box-orient
box-pack