* {
padding: 0;
margin: 0;
border: 1px solid red;
box-sizing: border-box;
}
form {
position: fixed;
bottom: 0;
left: 0;
right: 0;
}
form input {
width: 90%;
font-size: 50px;
vertical-align: middle;
}
form button {
width: 9%;
vertical-align: middle;
}

<!DOCTYPE html>
<html>
<body>
<form>
<input id="m" type="text">
<button>POST</button>
</form>
</body>
</html>
&#13;
我想创建一个简单的文本和按钮页面。要求是:
我怎样才能实现这一目标?文本比现在的按钮大得多。
答案 0 :(得分:4)
Flexbox可以做到这一点:
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
form {
position: fixed;
bottom: 0;
left: 0;
right: 0;
display: flex;
}
form input {
width: 90%;
font-size: 50px;
}
form button {
width: 9%;
}
&#13;
<form>
<input id="m" type="text">
<button>POST</button>
</form>
&#13;