gowhere

生来就可爱ヽ(ⅴ<●) 提交于 2020-04-30 14:55:22

489

import 'css/reset.css'
reset.css
html{
 font-size:50px;
}
a{
 text-decoration: none;
}
cnpm i fastclick -S
main.js
import FastClick from 'fastclick'
FastClick.attach(document.body)

iconfont

font文件夹
.svg
.eot
.ttf
.woff

修改引用路径

![image-20200429144749585](/Users/zhixiong/Library/Application Support/typora-user-images/image-20200429144749585.png)

import 'css/iconfont.css'

490

![image-20200429154411032](/Users/zhixiong/Library/Application Support/typora-user-images/image-20200429154411032.png)

App.vue
<router-view>
router.js
import Home from '@/components/home/Home'

routers:[
	{
		path:'/',
		name:'Home',
		component:Home
	}
]

491

<template>
        <div class="header">
            <div class="header-left">
                <span class="iconfont">&#xe624;</span>
            </div>
            <div class="header-search"><span class='iconfont'>
            &#xe632;
         </span>输入城市/景点/游玩主题
            </div>
            <div class="header-right">北京<span class='iconfont'>&#xe6aa;</span></div>
        </div>
</template>
<style scoped>
    .header {
        display: flex;
        width: 100%;
        background: #00bcd4;
        color: #fff;
        font-size: .36rem;
        line-height: .88rem;
    }

    .header-left {
        width: .4rem;
        padding: 0 .2rem;
        text-align: center;
        font-weight: bold;
    }

    .header-search {
        flex: 1;
        background: #ffffff;
        height: .6rem;
        margin: .14rem 0;
        border-radius: .1rem;
        color: #e4e7ea;
        line-height: .6rem;
        font-size: .28rem;
        padding-left: .2rem;
    }

    .header-right {
        font-size: .28rem;
        padding: 0 .2rem;
    }
    .header-right a {
        color: #ffffff;
    }

</style>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!