我有一个嵌入div内的textarea。为什么textarea是一种低利润率。我该如何删除它?
HTML
<form id="form">
<div class="message_content">
<textarea name="content" type="text" autocomplete="off"></textarea>
</div>
</form>
CSS
.message_content {
height:auto;
overflow: auto;
background: red;
}
.message_content textarea {
font-size: 14px;
color: grey;
height: 200px;
margin: 0;
resize: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
答案 0 :(得分:4)
只需添加textarea
:
display: inherit;
<强> CSS 强>
.message_content textarea {
font-size: 14px;
color: grey;
height: 200px;
margin: 0;
resize: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
display: inherit; /*Add this*/
}
答案 1 :(得分:2)
使用以下CSS代码:
.message_content {
height:auto;
overflow: auto;
background: red;
}
.message_content textarea {
display: inherit;
font-size: 14px;
color: grey;
height: 200px;
margin: 0;
resize: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
答案 2 :(得分:2)
在.message_content textarea display:block;
答案 3 :(得分:0)