L_Lucifer 2021-08-26 11:07 采纳率: 100%
浏览 78
已结题

微信小程序外边距问题

img

弄了个盒子 盒子里面装了个按钮 按钮写了外边距后强行把盒子带下来了 怎么解决

这是代码

.top{
  height: 400rpx;
  background-color: rgba(0, 148, 255);
}

.context{
  color: white;
}

.login_btn{
  margin-top: 30rpx;
}
.root {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pitch{
  width: 200rpx;
  height: 200rpx;
  border-radius: 50%;
  margin-top: 30rpx;
  margin-bottom: 10rpx;
}

<view class="top">
<button class="login_btn" wx:if="{{!userInfo}}" bindtap="login">微信登录</button>
  <view wx:else class="root">
    <image class="pitch" src="{{userInfo.avatarUrl}}"></image>
    <text class="context">{{userInfo.nickName}}</text>
    <button bindtap="loginOut" type="warn">退出登录</button>
     </view>
</view>



  • 写回答

1条回答 默认 最新

报告相同问题?

问题事件

  • 系统已结题 9月3日
  • 已采纳回答 8月26日
  • 修改了问题 8月26日
  • 修改了问题 8月26日
  • 展开全部

悬赏问题

  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 AT89C51控制8位八段数码管显示时钟。
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题