คำอธิบาย
นาทีความกว้างของคุณสมบัติที่จะใช้ในการตั้งค่าที่ถูกผูกไว้ที่ต่ำกว่าความกว้างของธาตุนั้น
ค่าที่เป็นไปได้
นำไปใช้กับ
องค์ประกอบ HTML ทั้งหมดยกเว้นองค์ประกอบแบบอินไลน์และองค์ประกอบตารางที่ไม่ถูกแทนที่
ไวยากรณ์ DOM
object.style.minWidth = "50px"
ตัวอย่าง
นี่คือตัวอย่าง -
<html>
<head>
</head>
<body>
<p style = "min-width:400px; height:100px; border:1px solid red; padding:5px; margin:10px;">
This paragraph is 100px high and min width is 400px
This paragraph is 100px high and min width is 400px
This paragraph is 100px high and min width is 400px
This paragraph is 100px high and min width is 400px
This paragraph is 100px high and min width is 400px
</p>
<img alt = "logo" src = "/css/images/logo.png" width = "95" height = "84" />
</body>
</html>
สิ่งนี้จะให้ผลลัพธ์ดังต่อไปนี้ -