HTML DOM minHeight ÊôÐÔ

HTML DOM Style ¶ÔÏó

¶¨ÒåºÍÓ÷¨

minHeight ÊôÐÔÉèÖÃÔªËØµÄ×îС¸ß¶È¡£

Óï·¨£º

Object.style.minHeight=length|%

¿ÉÄܵÄÖµ

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

ʵÀý

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

<html>
<head>
<script type="text/javascript">
function setMinHeight()
{
document.getElementById("p1").style.minHeight="200px";
}
</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="setMinHeight()"
value="Set min height" />

</body>
</html>

HTML DOM Style ¶ÔÏó

VUE