gpt4 book ai didi

html - 如何设置输入文本的背景颜色?

转载 作者:行者123 更新时间:2023-11-28 09:00:21 25 4
gpt4 key购买 nike

.field {
float: right;
width: 170px;
height: 23px;
font: normal 13px Arial, Helvetica, sans-serif;
padding: 6px 24px 6px 6px;
background: #c1caca;
margin: 25px 10px
}
.search {
background: url(../images/search-icon.png) right no-repeat;
}
<div>
<form action="#" method="post">
<input type="text" class="field search ">
</form>
</div>

最佳答案

search

background 覆盖了颜色,背景颜色由 background-color 而不是 background

.field {
float: right;
width: 170px;
height: 23px;
font: normal 13px Arial, Helvetica, sans-serif;
padding: 6px 24px 6px 6px;
background-color: #c1caca;
margin: 25px 10px
}
.search {

}
<div>
<form action="#" method="post">
<input type="text" class="field search ">
</form>
</div>

关于html - 如何设置输入文本的背景颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26943860/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com