【发布时间】:2015-03-13 11:45:53
【问题描述】:
我无法在消息部分输入文本。它不会让我点击和输入。名称、电子邮件和反垃圾邮件部分工作正常,只有文本区域不行。我用谷歌搜索并没有找到关于 HTML textarea 标签的解决方案。
<form method="post" action="email.php">
<label>Name</label>
<input name="name" placeholder="Type Here">
<label>Email</label>
<input name="email" type="email" placeholder="Type Here">
//this is the problem
<label>Message</label>
<textarea name="message" placeholder="Type Here"></textarea>
<label>*What is 2+2? (Anti-spam)</label>
<input name="human" placeholder="Type Here">
<input id="submit" name="submit" type="submit" value="Submit">
</form>
这是我的 CSS:
.contact-form input[type=text],
.contact-form input[type=password],
.contact-form input[type=email],
.contact-form textarea,
.contact-form input[type=file] {
display: inline-block;
float: left;
padding: 12px 15px;
width: 100%;
border: 0;
border: 1px #DFDFDF solid;
background: #fff;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
-webkit-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.contact-form textarea {
clear: both;
width: 100%;
height: 180px;
resize: none;
}
【问题讨论】:
-
我猜消息字段被另一个元素“覆盖”了......你的 css 有问题......请发布它
-
也许是 JS 中的东西
-
css没有错
-
它不能正常工作。我无法在文本区域中输入文本。