【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;
}
}
分类:
CSS
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步