rpx

<template>
    <view class="rpx"></view>
</template>

<style lang="scss">
    // rpx是屏幕宽度自适应的动态单位,是把屏幕分为750份,750是固定值
    // 使用方法是把设计稿改为宽度750,缩放后取对应的宽度的rpx
    // app端不支持rpx
    
    .rpx {
        background-color: red;
        width: 100rpx;
        height: 300rpx;
    }
</style>

 

posted on 2025-02-28 14:26  ChoZ  阅读(7)  评论(0)    收藏  举报

导航