mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-24 18:36:51 +08:00
29 lines
537 B
Markdown
29 lines
537 B
Markdown
# Advanced Usage
|
||
|
||
## Browser adaptation
|
||
|
||
### 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)
|
||
|
||
#### PostCSS Config
|
||
|
||
postcss config example:
|
||
|
||
```js
|
||
module.exports = {
|
||
plugins: {
|
||
autoprefixer: {
|
||
browsers: ['Android >= 4.0', 'iOS >= 8'],
|
||
},
|
||
'postcss-pxtorem': {
|
||
rootValue: 37.5,
|
||
propList: ['*'],
|
||
},
|
||
},
|
||
};
|
||
```
|