::-webkit-progress-value

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.

Phần tử giả ::-webkit-progress-value trong CSS đại diện cho phần đã được lấp đầy của thanh thuộc phần tử <progress>. Nó là phần tử con của phần tử giả ::-webkit-progress-bar.

Note: Để ::-webkit-progress-value có hiệu lực, thuộc tính appearance cần được đặt thành none trên phần tử <progress>.

Cú pháp

css
::-webkit-progress-value {
  /* ... */
}

Ví dụ

Ví dụ này chỉ hoạt động trên các trình duyệt dựa trên Blink hoặc WebKit.

HTML

html
<progress value="10" max="50"></progress>

CSS

css
progress {
  -webkit-appearance: none;
}

::-webkit-progress-value {
  background-color: orange;
}

Kết quả

Ảnh chụp màn hình kết quả

Một thanh tiến trình sử dụng kiểu trên sẽ trông như sau:

A long orange and grey box. The left 20% is orange. The right 80% is grey.

Đặc tả

Không thuộc về bất kỳ tiêu chuẩn nào.

Khả năng tương thích trình duyệt

Xem thêm