【发布时间】:2018-02-01 21:42:58
【问题描述】:
我正在尝试转这个:
进入这个:
这是我的html代码:
<main class="container">
<section class="new-tweet">
<h2>Compose Tweet</h2>
<form method="POST" action="/tweets">
<textarea name="text" placeholder="What are you humming about?"></textarea>
<input type="submit" value="Tweet">
<span class="counter">140</span>
</form>
</section>
</main>
这是我的 CSS
.new-tweet {
flex-direction: column;
display: flex;
background-color: #ececec;
border-radius: 5px;
border-color: #bdbdbd;
border-style: solid;
border-width: 1px;
padding: 0.5em;
}
.new-tweet h2 {
margin-top: 0;
border-bottom: solid #4a4747 2.2px;
}
.new-tweet input {
width: 100px;
float: left;
padding: 10px 20px;
}
看起来这是一个网格有用的东西,但任何建议都将不胜感激。
【问题讨论】:
标签: css forms flexbox alignment elements