padding-top.uvue 550 字节
Newer Older
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
1 2 3
<template>
	<view style="flex-grow: 1;">
		<view>
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
4 5
			<text>padding-top: 25px</text>
			<view class="common" style="padding-top: 25px;">
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
6 7 8 9
				<view style="flex-grow: 1;background-color: red;"></view>
			</view>
		</view>

DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
10
		<view style="width: 250px;">
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
11 12 13 14 15 16 17 18 19 20 21 22 23 24
			<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 {
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
25 26
		width: 250px;
		height: 250px;
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
27 28 29
		background-color: gray;
	}
</style>