overflow-inline
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2023.
Đặc trưng media CSS overflow-inline có thể được dùng để kiểm tra cách thiết bị đầu ra xử lý nội dung tràn ra ngoài khối chứa ban đầu theo trục nội tuyến (inline axis).
Note:
Thuộc tính overflow-inline không xác định việc tràn có xảy ra hay không; thay vào đó, nó cho biết cách thiết bị xử lý sự tràn đó. Thông thường, trên màn hình trong hầu hết các trình duyệt, hành vi sẽ là "scroll" (cuộn): khi nội dung vượt quá không gian ngang có sẵn, thiết bị cho phép bạn cuộn để truy cập nội dung bị tràn.
Cú pháp
Đặc trưng overflow-inline được chỉ định là một giá trị từ khóa chọn từ danh sách bên dưới.
Ví dụ
>HTML
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam ac turpis
eleifend, fringilla velit ac, aliquam tellus. Vestibulum ante ipsum primis in
faucibus orci luctus et ultrices posuere cubilia Curae; Nunc velit erat,
tempus id rutrum sed, dapibus ut urna. Integer vehicula nibh a justo imperdiet
rutrum. Nam faucibus pretium orci imperdiet sollicitudin. Nunc id facilisis
dui. Proin elementum et massa et feugiat. Integer rutrum ullamcorper eleifend.
Proin sit amet tincidunt risus. Sed nec augue congue eros accumsan tincidunt
sed eget ex.
</p>
CSS
p {
white-space: nowrap;
}
@media (overflow-inline: scroll) {
p {
color: red;
}
}
Kết quả
Thông số kỹ thuật
| Specification |
|---|
| Media Queries Level 4> # mf-overflow-inline> |