【发布时间】:2019-02-14 12:35:44
【问题描述】:
我可以找到如何在 DIV 宽度固定高度中获得 100% Textarea,但对于流动内容却没有。
这里是我要找的:
html, body {
margin: 0;
padding: 0;
border:1px;
vertical-align:top;
font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:14px;
color:#333;
height: 100%;
background: #F60;
}
#container {
width: 100%;
padding-bottom: 75px;
}
#wrap {min-height: 100%;}
#header {
height: 100px;
width: 100%;
background: #069;
}
#content {
height: 100%;
width: 100%;
position: relative;
}
.content textarea{
border: 1px solid red;
height: 100%;
}
#footer {
position: relative;
margin-top: -75px;
clear:both;
height: 75px;
width: 100%;
background: green;
}
<div id="wrap">
<div id="container">
<div id="header">header</div>
<div id="content">message<br />
<textarea>This textarea doesn't fill the content in height.</textarea>
</div>
</div>
</div>
<div id="footer">footer</div>
基本上,我需要用textarea填充内容。
这可能吗? 提前谢谢你。
【问题讨论】: