ในคุณสมบัติล้น CSS ที่มีค่า เลื่อน โอเวอร์โฟลว์ถูกตัดและเพิ่มแถบเลื่อน ซึ่งช่วยให้ผู้ใช้สามารถอ่านเนื้อหาทั้งหมดได้
ตัวอย่าง
คุณสามารถลองเรียกใช้โค้ดต่อไปนี้เพื่อใช้งาน CSS overflow:scroll ทรัพย์สิน −
<!DOCTYPE html>
<html>
<head>
<style>
div {
background-color: orange;
width: 250px;
height: 45px;
border: 2px solid blue;
overflow: scroll;
}
</style>
</head>
<body>
<h1>Heading</h1>
<div>Overflow property used here. This is a demo text to show the working of CSS overflow: scroll. This won't hide the content. Now a scrollbar will be visible.</div>
</body>
</html> ผลลัพธ์
