输入类型搜索 - 如何获得白色占位符和清除按钮



在下面的示例中如何获得 placeholderclear 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='&#x1F50D;'>

尝试此

.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='&#x1F50D; Placeholder'>

最新更新