-moz-force-broken-image-icon
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.
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.
Thuộc tính CSS mở rộng -moz-force-broken-image-icon có thể được dùng để buộc biểu tượng ảnh bị hỏng hiển thị ngay cả khi ảnh bị hỏng có thuộc tính alt.
Cú pháp
-moz-force-broken-image-icon: 1;
-moz-force-broken-image-icon: 0;
/* Global values */
-moz-force-broken-image-icon: inherit;
-moz-force-broken-image-icon: initial;
-moz-force-broken-image-icon: revert;
-moz-force-broken-image-icon: revert-layer;
-moz-force-broken-image-icon: unset;
Giá trị
<integer>-
Giá trị
1nghĩa là biểu tượng ảnh bị hỏng được hiển thị ngay cả khi ảnh có thuộc tínhalt. Khi dùng giá trị0, ảnh sẽ hoạt động bình thường và chỉ hiển thị thuộc tínhalt.
Note:
Ngay cả khi giá trị được đặt thành 1, thuộc tính alt vẫn sẽ được hiển thị, cùng với biểu tượng ảnh bị hỏng.
Định nghĩa chính thức
| Initial value | 0 |
|---|---|
| Applies to | images |
| Inherited | no |
| Computed value | as specified |
| Animation type | discrete |
Cú pháp chính thức
-moz-force-broken-image-icon =
<integer>
<integer> =
<number-token>
Ví dụ
>HTML
<img src="/broken/image/link.png" alt="Broken image link" />
CSS
img {
-moz-force-broken-image-icon: 1;
height: 100px;
width: 100px;
}
Kết quả
Note:
Văn bản alt có thể không hiển thị nếu -moz-force-broken-image-icon được đặt thành 1 và ảnh không có (hoặc có quá nhỏ) height hay width.
Ghi chú
- Thuộc tính này chỉ hoạt động trên các trình duyệt dựa trên Gecko.
- Không khuyến nghị sử dụng thuộc tính này. Thay vào đó nên dùng thuộc tính
altphù hợp.
Thông số kỹ thuật
Không thuộc về bất kỳ tiêu chuẩn nào.