在下面的示例中,如何获得白色的placeholder
和clear button
-
谢谢。
.searcha{
display:block;
width:100%;
padding:3px 9px;
text-transform:uppercase;
font-size:1rem;
letter-spacing:0.5px;
background:#006790;
border:none;
outline:none;
color:white;
}
<input type='search' class='searcha' placeholder='🔍'>
答案 0 :(得分:1)
尝试一下
.searcha {
display: block;
width: 100%;
padding: 3px 9px;
text-transform: uppercase;
font-size: 1rem;
letter-spacing: 0.5px;
background: #006790;
border: none;
outline: none;
color: white;
}
::-webkit-input-placeholder {
color: white;
}
<input type='search' class='searcha' placeholder='🔍 Placeholder'>