🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[toc] # 3.4 接收礼物组件(一) - 布局 ## 3.4.1 实现金币的的布局 ``` <!--金币--> <view class="px-2 my-2" style="height: 80rpx;"> <view style="width: 325rpx; background-color: rgba(0,0,0,0.4);" class="flex align-center rounded-circle"> <view class="p"> <text class="text-warning">金币</text> </view> <view class="flex-1 flex flex-column justify-center"> <text class="text-white font">100</text> </view> </view> </view> ``` ## 3.4.2 实现礼物的布局 ``` <!-- 礼物 --> <view style="height:500rpx;"> <scroll-view scroll-y="true" style="width: 520rpx; height: 500rpx;"> <view class="flex align-center px-3"> <view style="width: 325rpx; background-image: linear-gradient(to right,#BCABB1, #65AAF0);" class="flex align-center rounded-circle"> <view class="p"> <image src="../../static/tabbar/min.png" style="width: 70rpx; height: 70rpx;" class="rounded-circle"></image> </view> <view class="flex-1 flex flex-column justify-center"> <text class="text-white font">昵称</text> <text class="text-white font-sm">送蛋糕</text> </view> <view class="p"> <image src="../../static/gift/1.png" style="width: 70rpx; height: 70rpx;" class="rounded-circle"></image> </view> </view> <text class="text-warning font-lg ml-1">X 100</text> </view> </scroll-view> </view> ```