nvue页面,元素默认溢出隐藏,怎么取消啊,这种样式都做不了
1***@163.com
- 发布:2023-05-09 10:14
- 更新:2023-05-09 10:46
- 阅读:652
嵌套两层,利用padding加position可以实现
<view class="container">
<view class="content">
<text class="title">提交成功!</text>
</view>
<image class="success"></image>
</view>
<style>
.container {
align-items: center;
justify-content: center;
padding-top: 80rpx;
}
.content {
width: 650rpx;
border-radius: 20rpx;
background-color: #fff;
}
.success {
position: absolute;
left: 245rpx;
top: 0;
width: 160rpx;
height: 160rpx;
}
</style>
1***@163.com (作者)
好吧,只能通过外层嵌套盒子,留出富余距离来实现
2023-05-09 10:54