HTML DOM minWidth ÊôÐÔ

HTML DOM Style ¶ÔÏó

¶¨ÒåºÍÓ÷¨

minWidth ÊôÐÔÉèÖÃÔªËØ¿òµÄ×îС¿í¶È¡£

Óï·¨£º

Object.style.minWidth=length|%

¿ÉÄܵÄÖµ

Öµ ÃèÊö
length ¶¨ÒåÔªËØµÄ×îС¿í¶ÈÖµ¡£
% ¶¨Òå»ùÓÚÆä°üº¬¿éµÄ°Ù·Ö±È×îС¿í¶È¡£

ʵÀý

±¾ÀýÉèÖÃÔªËØ¿òµÄ×îС¿í¶È£º

<html>
<head>
<script type="text/javascript">
function setMinWidth()
{
document.getElementById("p1").style.minWidth="1000px";
}
</script>
</head>
<body>

<p id="p1">This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.</p>

<input type="button" onclick="setMinWidth()" value="Set min width" />

</body>
</html>

HTML DOM Style ¶ÔÏó

VUE