国产成人精品亚洲777人妖,欧美日韩精品一区视频,最新亚洲国产,国产乱码精品一区二区亚洲

您的位置:首頁技術(shù)文章
文章詳情頁

vue實現(xiàn)帶放大鏡的搜索框

瀏覽:24日期:2023-12-11 16:47:44

本文實例為大家分享了vue實現(xiàn)帶放大鏡的搜索框,供大家參考,具體內(nèi)容如下

字體圖標在input單標簽中的用法:

vue實現(xiàn)帶放大鏡的搜索框

第一步,先在main.js 中全局引入iconfont圖標;第二步,給input 標簽動態(tài)綁定一個屬性,設(shè)置值為data中的變量;第三步,將字體圖標代碼中的 &#x 改為 u

vue實現(xiàn)帶放大鏡的搜索框

vue實現(xiàn)帶放大鏡的搜索框

代碼如下:

<template> <div class='login'><!--頭部搜索 --> <div class='top'> <div class='top-text iconfont'>廣州&#xe612;</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 請輸入關(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>

以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助,也希望大家多多支持好吧啦網(wǎng)。

標簽: Vue
相關(guān)文章:
主站蜘蛛池模板: 渭源县| 焉耆| 高淳县| 西城区| 昭通市| 南部县| 仙居县| 右玉县| 石柱| 博白县| 广东省| 格尔木市| 井陉县| 西华县| 西林县| 大竹县| 辽阳县| 阿克| 永康市| 温州市| 吴堡县| 珠海市| 黔江区| 香格里拉县| 紫金县| 泸定县| 仙游县| 雷州市| 崇州市| 湘潭市| 卢龙县| 项城市| 石台县| 东方市| 旌德县| 芜湖县| 咸阳市| 巨野县| 望奎县| 崇文区| 南宫市|