rem配置参考

html{font-size:10px}
@media screen and (min-width:321px) and (max-width:375px){html{font-size:11px}}
@media screen and (min-width:376px) and (max-width:414px){html{font-size:12px}}
@media screen and (min-width:415px) and (max-width:639px){html{font-size:15px}}
@media screen and (min-width:640px) and (max-width:719px){html{font-size:20px}}
@media screen and (min-width:720px) and (max-width:749px){html{font-size:22.5px}}
@media screen and (min-width:750px) and (max-width:799px){html{font-size:23.5px}}
@media screen and (min-width:800px){html{font-size:25px}}

参考:http://www.cnblogs.com/PeunZhang/p/3407453.html

转载于:https://my.oschina.net/u/879103/blog/634539

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要使用postcss-pxtorem插件,首先需要安装postcss和postcss-pxtorem。可以通过运行命令npm install postcss postcss-pxtorem --save-dev来进行安装。 接下来,需要配置postcss的配置文件。一般可以在vant官网的进阶用法中找到相关配置信息。在配置文件中,需要使用postcss-pxtorem插件,并设置rootValue和propList参数。 rootValue参数用于将px转为rem。根据引用的配置示例,rootValue函数会判断文件名中是否包含'vant'关键字,如果包含则将rootValue设置为37.5,否则设置为75。 propList参数用于指定需要转换的属性列表。使用['*']可以将所有属性的px值转换为rem值。 最后,将postcss-pxtorem插件添加到postcss的配置文件中,并将rootValue和propList参数进行设置,具体配置可以参考vant官网的进阶用法。 需要注意的是,如果出现语法错误,可能是因为所使用的postcss-pxtorem插件需要PostCSS 8版本。请确保安装的PostCSS版本符合要求。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [postcss-pxtorem 插件的配置](https://blog.csdn.net/weixin_58414196/article/details/123639073)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* [移动端---在vant中使用postcss-pxtorem 和lib-flexible 实现rem布局适配](https://blog.csdn.net/h18377528386/article/details/122844462)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值