mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[Doc] add rem guide (#928)
This commit is contained in:
parent
effc9591a3
commit
734e885727
@ -68,3 +68,9 @@ Vue.use(Vant);
|
||||
```shell
|
||||
vue init youzan/vue-cli-template-vant projectName
|
||||
```
|
||||
|
||||
### rem units
|
||||
Vant use `px` as size units by default,you can use tools such as `postcss-pxtorem` to transform units to `rem`.
|
||||
|
||||
- [postcss-pxtorem](https://github.com/cuth/postcss-pxtorem)
|
||||
- [lib-flexible](https://github.com/amfe/lib-flexible)
|
||||
|
@ -69,3 +69,9 @@ Vue.use(Vant);
|
||||
```shell
|
||||
vue init youzan/vue-cli-template-vant projectName
|
||||
```
|
||||
|
||||
### rem 适配
|
||||
Vant 中的组件样式默认使用`px`作为单位,如果需要使用`rem`作为单位,推荐使用以下两个工具
|
||||
|
||||
- [postcss-pxtorem](https://github.com/cuth/postcss-pxtorem) 用于将单位转化为 rem
|
||||
- [lib-flexible](https://github.com/amfe/lib-flexible) 用于设置 rem 基准值
|
||||
|
Loading…
x
Reference in New Issue
Block a user