text
英[tekst] 美[tɛkst]
n.文本,原文;課文,教科書;主題;版本
#v .傳簡訊
第三人稱單數: texts 複數: texts 現在分詞: texting 過去式: texted
##indent
#英[ɪnˈdent] 美[ ɪnˈdent] vt.切割…使呈鋸齒狀;縮排版n.(印刷中的)縮排;訂單,訂購#第三人稱單數: indents現在分詞: indenting 過去式: indented 過去分詞: indented
javascript textIndent屬性 語法
作用:縮排元素中的首行文字。
語法:Object.style.textIndent=length|%
javascript textIndent屬性 範例
<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>
執行實例 »
點擊 "執行實例" 按鈕查看線上實例