有我的代码:
https://jsfiddle.net/a4Le1jkz/.
HTML
CSS
.form-container {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
position: absolute;
width: 100%;
color: white;
top: auto;
bottom: 0;
overflow: hidden;
padding: 10px;
}
.form-container .twrap {
overflow: hidden;
padding-right: 10px;
}
.form-container textarea {
width: 100%;
height: 30px;
line-height: 30px;
max-height: 120px;
font-size: 1.2em;
resize : none;
}
.form-container .send {
padding: 3px;
height: 30px;
float: right;
}
即使用户按Enter键,我也希望将图像保留在textarea的底部. textearea必须继续调整其宽度.
图像浮动,所以我不知道如何将它保持在底部.