我有一个带有搜索图标背景图像的按钮,但我无法添加margin-bottom
以将文本区域与按钮对齐。为什么添加一个margin-bottom
到按钮不能做任何事情?或者,将textarea与按钮对齐的正确方法是什么?如何将边缘添加到带有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>
我找到了位置:相对安静有帮助!我不太清楚为什么,但与位置相关,如果我调整textarea的大小,搜索图标将沿着文本框的右下角,这是非常好的。 https://jsfiddle.net/cvczx8st/6/ – irregular