简体   繁体   English

搜索栏中的输入图标

[英]Input Icon in a search bar

I am trying to input a search icon in the search bar. 我正在尝试在搜索栏中输入搜索图标。 This is my code that I have used, but the icon is outside the input bar. 这是我使用的代码,但是图标在输入栏的外面。 I would like it to be inside the on the rightmost side. 我希望它位于最右侧。

                    <div class="search">
                    <i class="el-icon-search"></i>
                    <el-input placeholder="Search term"></el-input></div>

you should give a style for the icon , such as 您应该为图标指定样式,例如

 i{ position: absolute; left: 2px; } 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM