This article shares with you how to use Vue to implement a search box with a magnifying glass. The specific content is as follows Usage of font icons in input single tag: The first step is to globally import the iconfont icon in main.js; The code is as follows: <template> <div class="login"> <!--Header Search--> <div class="top"> <div class="top-text iconfont">Guangzhou</div> <div class="top-btn"> <input type="text" :placeholder="icon" class="iconfont"> </div> <div class="top-x iconfont iconlingdang1"></div> </div> </div> </template> <script> export default { name:"Login", data(){ return { icon:'\ue637 Please enter keywords' } } } </script> <style scoped> .login{ width: 100%; height: 100%; } .top{ width: 100%; height: 0.8rem; background-color: pink; display:flex; align-items: center; font-size:0.35rem; } .top-text{ margin-left:0.3rem; } .top-btn{ width: 4.8rem; height: 0.5rem; margin-left:0.2rem; margin-right:0.55rem; } .top-btn>input{ width: 100%; height:0.5rem; border-radius:1rem; border:none; outline: none; padding-left:0.3rem; } </style> The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Example code for using Nginx to implement 301 redirect to https root domain name
Start cleaning carefully! List unused volumes doc...
Copy code The code is as follows: <BODY> //...
Table of contents 1. Security issues with Docker ...
Today I have nothing to do, so I listed some tool...
It is very simple to build a go environment under...
They are all web page templates from the foreign ...
Table of contents Basic Selector Extensions Attri...
Write to the css file Copy code The code is as fol...
This article shares the specific code of js to im...
This article mainly introduces how to implement l...
What are the benefits of learning HTML? 1: Easily...
When submitting a form, you may encounter situatio...
Rendering Code - Take the blue and yellow rings a...
Table of contents Example 1 Example 2 Example 3 E...
background When we talk about transactions, every...