Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> CSS

CSS position: static


ตำแหน่งคงที่ (Static Positioning)

position: static เป็นค่าเริ่มต้น องค์ประกอบจะอยู่ตามลำดับปกติของเอกสาร คุณสมบัติ top, right, bottom, left ไม่มีผล

ตัวอย่าง

<!DOCTYPE html>
<html>
<head>
  <style>
    div.static {
      position: static;
      border: 3px solid blue;
    }
  </style>
</head>
<body>
  <h1>Positioning Element</h1>
  <div class="static">div element with position: static;</div>
</body>
</html>