Nuxt.js实战 下

8.界面优化
8.1 优化首页

我们发现,在项目启动后,页面的头部和尾部已经能正常显示,但页面中间的文字,不是我们想要的。 如果想修改这里的文字或图片,则可以在项目根目录下的pages目录中,修改index.vue,因为当前项目默认访问的就是这个文件。
<template>
  <section class="container">
    <div>
      <app-logo/>
      <h1 class="title">
        黑马旅游网
      </h1>
      <h2 class="subtitle">
        你最值得信赖的旅游指导
      </h2>
      <div class="links">
        <a
          href="http://www.itcast.cn/"
          target="_blank"
          class="button--green">传智播客</a>
        <a
          href="http://www.itheima.com/"
          target="_blank"
          class="button--green">黑马程序员</a>
      </div>
    </div>
  </section>
</template>
 
<script>
import AppLogo from '~/components/AppLogo.vue'
export default {
  components: {
    AppLogo
  }
}
</script>
 
<!-- css样式,可以根据自己选择进行调整 -->
<style>
.container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}
 
.title {
  font-family: "Quicksand","Source Sans Pro",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif; /* 1 */
  display: block;
  font-weight: 300;
  font-size: 70px;
  color: #35495e;
  letter-spacing: 1px;
}
 
.subtitle {
  font-weight: 300;
  font-size: 20px;
  color: #526488;
  word-spacing: 5px;
  padding-bottom: 15px;
}
 
.links {
  padding-top: 15px;
}
</style>
修改后,效果如图所示 
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值