【CSS】写一个原生的透明 input 标签输入框
<div class="search">
<img src="@/assets/tools/search.svg" />
<input placeholder="搜索" @input="onSearch" v-model="searchValue" />
</div>
.search {
height: 32px;
width: 204px;
display: flex;
background: rgba(0, 0, 0, 0.2);
border: 1px solid #888888;
border-radius: 16px;
margin: 10px;
justify-content: center;
input {
background: transparent;
border: none;
color: #fff;
padding: 0 10px;
width: 100%;
outline: none;
font-size: 14px;
}
input::-webkit-input-placeholder {
color: #dddddd;
}
}