vue實(shí)現(xiàn)帶放大鏡的搜索框
本文實(shí)例為大家分享了vue實(shí)現(xiàn)帶放大鏡的搜索框,供大家參考,具體內(nèi)容如下
字體圖標(biāo)在input單標(biāo)簽中的用法:
第一步,先在main.js 中全局引入iconfont圖標(biāo);第二步,給input 標(biāo)簽動(dòng)態(tài)綁定一個(gè)屬性,設(shè)置值為data中的變量;第三步,將字體圖標(biāo)代碼中的 &#x 改為 u
代碼如下:
<template> <div class='login'><!--頭部搜索 --> <div class='top'> <div class='top-text iconfont'>廣州</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 請(qǐng)輸入關(guān)鍵詞’ }} }</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>
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持好吧啦網(wǎng)。
相關(guān)文章:
1. 解決Android Studio 格式化 Format代碼快捷鍵問題2. JavaEE SpringMyBatis是什么? 它和Hibernate的區(qū)別及如何配置MyBatis3. SpringBoot+TestNG單元測(cè)試的實(shí)現(xiàn)4. Python使用urlretrieve實(shí)現(xiàn)直接遠(yuǎn)程下載圖片的示例代碼5. 完美解決vue 中多個(gè)echarts圖表自適應(yīng)的問題6. vue實(shí)現(xiàn)web在線聊天功能7. Springboot 全局日期格式化處理的實(shí)現(xiàn)8. JavaScript實(shí)現(xiàn)頁(yè)面動(dòng)態(tài)驗(yàn)證碼的實(shí)現(xiàn)示例9. php解決注冊(cè)并發(fā)問題并提高QPS10. Java使用Tesseract-Ocr識(shí)別數(shù)字
