-moz-user-focus
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.
Thuộc tính CSS -moz-user-focus được dùng để chỉ định liệu một phần tử có thể nhận focus hay không.
Bằng cách đặt giá trị thành ignore, bạn có thể vô hiệu hóa việc focus vào phần tử, nghĩa là người dùng sẽ không thể kích hoạt phần tử đó, và phần tử sẽ bị bỏ qua trong trình tự Tab.
Giá trị mặc định là none, sẽ vô hiệu hóa focus vào phần tử và xóa focus khỏi các phần tử khác nếu có cố gắng chọn phần tử.
Cú pháp
/* Giá trị từ khóa */
-moz-user-focus: none;
-moz-user-focus: normal;
-moz-user-focus: ignore;
/* Giá trị toàn cục */
-moz-user-focus: inherit;
-moz-user-focus: initial;
-moz-user-focus: unset;
Giá trị
Định nghĩa hình thức
| Initial value | none |
|---|---|
| Applies to | all elements |
| Inherited | no |
| Computed value | as specified |
| Animation type | discrete |
Cú pháp hình thức
-moz-user-focus =
ignore |
normal |
none
Ví dụ
>HTML
<input class="ignored" value="Người dùng không thể focus vào phần tử này." />
CSS
.ignored {
-moz-user-focus: ignore;
}
Đặc tả
Không thuộc bất kỳ tiêu chuẩn nào.