HTML DOM textIndent ÊôÐÔ

HTML DOM Style ¶ÔÏó

¶¨ÒåºÍÓ÷¨

textIndent ÊôÐÔËõ½øÔªËØÖеÄÊ×ÐÐÎı¾¡£

Óï·¨£º

Object.style.textIndent=length|%

¿ÉÄܵÄÖµ

Öµ ÃèÊö
length ¶¨Òå¹Ì¶¨µÄËõ½ø¡£Ä¬ÈÏÖµ£º0¡£
% ¶¨Òå»ùÓÚ¸¸ÔªËØ¿í¶ÈµÄ°Ù·Ö±ÈµÄËõ½ø¡£

ʵÀý

±¾ÀýËõ½øÎı¾£º

<html>
<head>
<script type="text/javascript">
function setTextIndent()
{
document.getElementById("div1").style.textIndent="50px";
}
</script>
</head>
<body>

<div id="div1">
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.
This is some text. This is some text. This is some text.
</div>
<br />
<input type="button" onclick="setTextIndent()"
value="Indent first line of text" />

</body>
</html>

HTML DOM Style ¶ÔÏó

VUE