<template> <view style="flex-grow: 1;"> <view> <text>padding-right: 50rpx</text> <view class="common" style="padding-right: 50rpx;"> <view style="flex-grow: 1;background-color: red;"></view> </view> </view> <view style="width: 500rpx;"> <text>padding-right: 10%</text> <view class="common" style="padding-right: 10%;"> <view style="flex-grow: 1;background-color: red;"></view> </view> </view> </view> </template> <script> </script> <style> .common { width: 500rpx; height: 500rpx; background-color: gray; } </style>