ตำแหน่ง:แก้ไข; คุณสมบัติช่วยให้คุณวางตำแหน่งองค์ประกอบที่สัมพันธ์กับวิวพอร์ต คุณสามารถลองเรียกใช้โค้ดต่อไปนี้เพื่อใช้ตำแหน่ง CSS:fixed;
ตัวอย่าง
<!DOCTYPE html>
<html>
<head>
<style>
div{
position: fixed;
bottom: 0;
right: 0;
width: 200px;
border: 3px solid blue;
}
</style>
</head>
<body>
<h2>position: fixed;</h2>
<p>The position: fixed; property allows you to position element relative to the viewport.</p>
<div>
div has position: fixed;
</div>
</body>
</html> ผลลัพธ์
