找回密码
 立即注册
查看: 2|回复: 0

8,VUE默认首页文件,自适应

[复制链接]

261

主题

6

精华

265

金币

技术维护QQ:515138

积分
571
发表于 昨天 08:39 | 显示全部楼层 |阅读模式
  1. <scri pt setup>
  2. import HelloWorld from './components/HelloWorld.vue'
  3. import TheWelcome from './components/TheWelcome.vue'
  4. </scrip t>
  5. <template>
  6.   <header>
  7.     <img alt="Vue logo" class="logo" src="./assets/logo.svg" width="125" height="125" />
  8.     <div class="wrapper">
  9.       <HelloWorld msg="You did it!" />
  10.     </div>
  11.   </header>
  12.   <main>
  13.     <TheWelcome />
  14.   </main>
  15. </template>
  16. <style scoped>
  17. header {
  18.   line-height: 1.5;
  19. }
  20. .logo {
  21.   display: block;
  22.   margin: 0 auto 2rem;
  23. }
  24. @media (min-width: 1024px) {
  25.   header {
  26.     display: flex;
  27.     place-items: center;
  28.     padding-right: calc(var(--section-gap) / 2);
  29.   }
  30.   .logo {
  31.     margin: 0 2rem 0 0;
  32.   }
  33.   header .wrapper {
  34.     display: flex;
  35.     place-items: flex-start;
  36.     flex-wrap: wrap;
  37.   }
  38. }
  39. </style>
复制代码





上一篇:7,整站使用Vue(工程化)
下一篇:9,写入数据两种方法
网站建设,公众号小程序开发,系统定制,软件App开发,技术维护【联系我们】手机/微信:17817817816 QQ:515138

QQ|Archiver|自丢网 ( 粤ICP备2024252464号-1 )

GMT+8, 2026-3-6 00:31

专注于网站建设,公众号小程序制作,商城小程序,系统定制,软件App开发

【联系我们】手机/微信:17817817816 QQ:515138

快速回复 返回顶部 返回列表