前端笔记-vue cli为web添加底纹
生活随笔
收集整理的這篇文章主要介紹了
前端笔记-vue cli为web添加底纹
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
目錄
?
基本概念
代碼與實例
?
基本概念
這里主要是使用了css預處理
首先下載包
npm install stylus stylus-loader隨后創建文件,然后寫代碼
這里還要導入代碼:
這里還要引入下:
程序運行截圖如下:
?
代碼與實例
文件結構如下:
源碼如下:
blogbal.styl
html, body{margin 0padding 0width 100%height 100% }body{background-image: url("../images/bg.jpg") }main.js
// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' import App from './App' import router from './router'import './assets/styles/global.styl'Vue.config.productionTip = false/* eslint-disable no-new */ new Vue({el: '#app',router,components: { App },template: '<App/>' })?
?
總結
以上是生活随笔為你收集整理的前端笔记-vue cli为web添加底纹的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: QML笔记-4中方式运行qml文件
- 下一篇: 前端笔记-vue cli中axios批量