2010-09-14 85 views

回答

3

HTML:

<input type='text' id='my-text-box' value="Default text" /> 

CSS:

#my-text-box { 
    font-weight: bold; 
    font-size: 18px; /* or larger */ 
    height: 2em; /* or larger */ 
    width: 400px; /* or larger */ 
} 
+1

@meagar:我認爲這個問題是要求單行文本框,儘管它的措辭。 – 2010-09-14 19:00:00

+0

@meagar,@Paul似乎是正確的,查看問題中的鏈接頁面。 – 2010-09-14 19:19:16

+0

哎呀是啊我意識到他的意思是一個輸入中間答案,但忘記更新我的結束標記 – Jiaaro 2010-09-14 19:19:32

3

嘗試這些CSS-設置:

#myLargeTextboxId { 
    font-size:33px; 
    height:33px; 
    left:0; 
    line-height:33px; 
    padding:8px 8px 7px; 
    top:0; 
    width:224px; 
}
0

予檢查的元件,它顯示了這樣的:

<input name="phone_number" class="text" id="phone_number" style="padding-bottom: 7px; line-height: 33px; padding-left: 8px; width: 224px; padding-right: 8px; height: 33px; font-size: 33px; top: 0px; padding-top: 8px; left: 0px;" type="text"/> 
1

只需加上font-size即可,但您可能還需要一些padding。一個沒有填充的大字體看起來很傻。

FireBug是你的朋友。把它用在你以前從未見過的所有東西上並學習。