6.7.5旅游网站小项目练习之城市列表页header区组件代码

<template>
    <div class="header">
        <router-link to="/">
            <div class="iconfont header-back">&#xe624;</div>
        </router-link>
        城市选择
    </div>
</template>

<script>
export default {
    name: 'CityHeader'
}
</script>

<style lang="stylus" scoped>
    @import '~@/assets/styles/varibles.styl'
    .header
        position: relative
        overflow: hidden
        height: .86rem
        line-height: .86rem
        text-align: center
        color: #fff
        background: $bgColor
        font-size: .32rem
        .header-back
            position: absolute
            left: 0
            top: 0
            width: .64rem
            text-align: center
            font-size: .4rem
            color: #fff
</style>

你可能感兴趣的:(前端~Vue的一些学习笔记)