使用溢出和文本位置形成文本框问题

时间:2014-02-25 08:02:12

标签: html css forms

我想要一个具有以下参数的文本框:width:450px和height:150px。 我不希望文本溢出并从顶部开始。

我的文字不知何故从盒子中间开始,最后溢出而不是破碎。

Startseite:</br> <input style="height:150px; width:450px;" type="text" name="Startseite" value=""></br></br>

小提琴:http://jsfiddle.net/FTkT2/1/

3 个答案:

答案 0 :(得分:1)

我认为您需要使用input而不是text类型textarea。例如

<textarea rows="10" cols="50"></textarea>

答案 1 :(得分:1)

您可以使用textarea:

<textarea style="height:150px; width:450px; overflow: auto; vertical-align: top;"  name="myField"></textarea>

答案 2 :(得分:1)

您需要使用textarea代替input

参考你的小提琴:

MyField:</br> <textarea style="height:150px; width:450px;" type="text" name="myField" value=""></textarea></br></br>

您还可以使用colsrows属性作为尺寸。

<textarea rows="4" cols="50"></textarea>