Giter VIP home page Giter VIP logo

vuemobiletemp's Introduction

vueMobileTemp

vue移动端适配方案以及vue练习

技术栈

  • vue-cli:使用脚手架工具创建项目
  • postcss-pxtorem:转换px为rem的插件

设置根节点html的font-size

1、创建rem.js文件

2、在main.js中引入rem.js

配置 postcss-pxtorem 自动转换px为rem

1、安装 postcss-pxtorem

$ npm install postcss-pxtorem -D

2、修改根目录 .postcssrc.js 文件

找到 plugins 属性新增pxtorem的设置

"postcss-pxtorem": {
  "rootValue": 32,
  "propList": ["*"],
  // 注意:如果有使用第三方UI如VUX,则需要配置下忽略选择器不转换。
  // 规则是class中包含的字符串,如vux中所有的class前缀都是weui-。也可以是正则。
  "selectorBlackList": ["weui-"]
}

vuemobiletemp's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.