本文介紹了你如何增加一個(gè)html文本框的高度的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!
問(wèn)題描述
如何增加文本框的高度?(連同它的字體大小)
How do you increase the height of an textbox? (along with its font size)
推薦答案
我假設(shè)從您提出問(wèn)題的方式來(lái)看,您想在頁(yè)面呈現(xiàn)后更改大小?
I'm assuming from the way you worded the question that you want to change the size after the page has rendered?
在 Javascript 中,您可以操作 DOM CSS 屬性,例如:
In Javascript, you can manipulate DOM CSS properties, for example:
document.getElementById('textboxid').style.height="200px";
document.getElementById('textboxid').style.fontSize="14pt";
如果您只是想指定高度和字體大小,請(qǐng)使用 CSS 或樣式屬性,例如
If you simply want to specify the height and font size, use CSS or style attributes, e.g.
//in your CSS file or <style> tag
#textboxid
{
height:200px;
font-size:14pt;
}
<!--in your HTML-->
<input id="textboxid" ...>
或者
<input style="height:200px;font-size:14pt;" .....>
這篇關(guān)于你如何增加一個(gè)html文本框的高度的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!