feat: unocss 配置说明

This commit is contained in:
菲鸽
2024-05-02 12:14:02 +08:00
parent a2a78f0c13
commit 7d05cea7fe
2 changed files with 13 additions and 5 deletions

View File

@@ -80,6 +80,13 @@ export default defineConfig({
/**
* 最终这一套组合下来会得到:
* mp 里面mt-4 => margin-top: 32rpx
* h5 里面mt-4 => margin-top: 1rem
* mp 里面mt-4 => margin-top: 32rpx == 16px
* h5 里面mt-4 => margin-top: 1rem == 16px
*
* 另外,我们还可以推算出 UnoCSS 单位与设计稿差别4倍。
* 375 * 4 = 1500把设计稿设置为1500那么设计稿里多少pxunocss就写多少述职。
* 举个例子设计稿显示某元素宽度100px就写w-100即可。
*
* 如果是传统方式写样式,则推荐设计稿设置为 750这样设计稿1px代码写1rpx。
* rpx是响应式的可以让不同设备的屏幕显示效果保持一致。
*/