課程
/前端開發(fā)
/HTML/CSS
/初識HTML(5)+CSS(3)-升級版
文本輸入框或者輸入域可以設(shè)置讓其高度隨著字數(shù)的增多而增高嗎?
2016-07-30
源自:初識HTML(5)+CSS(3)-升級版 6-2
正在回答
<textarea?style="width:300px;overflow-y:visible"></texarea> <!--傳說這樣是可以的-->
可以的,但是光css可能不行
完全可以呀 ?你試試<span style="float:left;">標題:</span><textarea type="text" style="width:260;overflow-x:visible;overflow-y:visible;"></textarea> ?
可以,得用JavaScript來寫
qq_曉風殘月 提問者
CSS代碼:
.test_box {
? ? width: 400px;?
? ? min-height: 120px;?
? ? max-height: 300px;
? ? _height: 120px;?
? ? margin-left: auto;?
? ? margin-right: auto;?
? ? padding: 3px;?
? ? outline: 0;?
? ? border: 1px solid #a0b3d6;?
? ? font-size: 12px;?
? ? word-wrap: break-word;
? ? overflow-x: hidden;
? ? overflow-y: auto;
? ? _overflow-y: visible;
}
HTML代碼:
<div class="test_box" contenteditable="true"><br /></div>?
舉報
HTML(5)+CSS(3)基礎(chǔ)教程8小時帶領(lǐng)大家步步深入學習標簽用法和意義
4 回答文本輸入框的問題
2 回答文本輸入框與密碼輸入框的問題
4 回答文本框輸入
1 回答輸入文本框
5 回答文本輸入框?
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學習伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2016-07-30
2016-07-30
可以的,但是光css可能不行
2016-07-30
完全可以呀 ?你試試<span style="float:left;">標題:</span><textarea type="text" style="width:260;overflow-x:visible;overflow-y:visible;"></textarea> ?
2016-07-30
可以,得用JavaScript來寫
2016-07-30
CSS代碼:
.test_box {
? ? width: 400px;?
? ? min-height: 120px;?
? ? max-height: 300px;
? ? _height: 120px;?
? ? margin-left: auto;?
? ? margin-right: auto;?
? ? padding: 3px;?
? ? outline: 0;?
? ? border: 1px solid #a0b3d6;?
? ? font-size: 12px;?
? ? word-wrap: break-word;
? ? overflow-x: hidden;
? ? overflow-y: auto;
? ? _overflow-y: visible;
}
HTML代碼:
<div class="test_box" contenteditable="true"><br /></div>?