-webkit-transition
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.
Note:
Tất cả các trình duyệt đều hỗ trợ thuộc tính transition mà không cần tiền tố nhà cung cấp. Chỉ các trình duyệt dựa trên WebKit (Safari), không phải Chromium, mới hỗ trợ tính năng media -webkit-transition. Không có trình duyệt nào hỗ trợ transition không có tiền tố dưới dạng truy vấn media (mặc dù một số trình duyệt hỗ trợ - -webkit-transform-3d). Hãy sử dụng truy vấn tính năng @supports (transition) thay thế.
Tính năng media CSS Boolean không chuẩn -webkit-transition là một phần mở rộng WebKit có giá trị là true nếu ngữ cảnh duyệt web hỗ trợ CSS transitions.
Apple có mô tả trong Safari CSS Reference; hiện nay được gọi là transition ở đó.
Note:
Bạn không nên sử dụng tính năng media này; nó chưa bao giờ được đặc tả, chưa bao giờ được triển khai rộng rãi, và đã bị xóa khỏi hầu hết các trình duyệt. Hãy sử dụng truy vấn tính năng @supports thay thế.
Cú pháp
@media (-webkit-transition) {
/* CSS sử dụng nếu tính năng media này và transition có tiền tố được hỗ trợ */
}
Ví dụ
>Sử dụng @supports thay thế
Không sử dụng tính năng media -webkit-transition. Thay vào đó, hãy kiểm tra hỗ trợ transition bằng cách sử dụng CSS @supports at-rule, như sau:
@supports (transition: initial) {
/* CSS sử dụng nếu transitions được hỗ trợ */
}
Ví dụ lỗi thời
Trước khi trở nên lỗi thời, bạn có thể sử dụng -webkit-transition trong CSS như sau:
@media (-webkit-transition) {
/* CSS sử dụng nếu transitions được hỗ trợ */
}
Đặc tả
Không thuộc bất kỳ tiêu chuẩn nào.