検索アイコンの背景画像を持つボタンがありますが、margin-bottom
を追加して、テキスト領域をボタンに合わせることができません。なぜボタンにmargin-bottom
を追加しても何もしませんか?または、テキストエリアをボタンに合わせる正しい方法は何ですか?CSSの背景画像を持つボタンに余白をどのように追加しますか?
.input-area {
width: 100%;
height: 46px;
}
.parse-text-button {
background: url(https://cdn1.iconfinder.com/data/icons/hawcons/32/698627-icon-111-search-32.png) no-repeat;
width: 24px;
height: 24px;
border: none;
margin-bottom: 10px;
}
<div class="input-area">
<textarea class="input" placeholder="Enter text here"></textarea>
<button class="parse-text-button" type="submit"></button>
</div>
私はその位置を見つけました:なぜ私は確かに私はテキストのサイズを変更する場合は相対的な位置と、検索アイコンは、テキストボックスの右下隅にはかなりいいです。 https://jsfiddle.net/cvczx8st/6/ – irregular