<template> <view style="flex-grow: 1;"> <view> <text>padding-top: 50rpx</text> <view class="common" style="padding-top: 50rpx;"> <view style="flex-grow: 1;background-color: red;"></view> </view> </view> <view style="width: 500rpx;"> <text>padding-top: 10%</text> <view class="common" style="padding-top: 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>