如何将text组件以及image放在同一行
发布于 6 年前 作者 qianggong 4833 次浏览 来自 官方Issues

请问各位大佬如何将这三个内容以  “< > with ❤️in TMC” 显示?

wxml:

<image src='/images/icon/字体代码 (1).png'        style="width:28rpx;height:28rpx">
     </image>
     <text class="copyright">with in TMC
     </text>
     <image style="width:28rpx;height:28rpx"  class="copyrightp" mode="" src = '/images/icon/爱心 _实心 (1).png' >
     </image>

wxss:

.copyright {
  font-size: 28rpx;
  color: #999;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30rpx;
  text-align: center;
   
}
.copyrightp{
 position: around;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30rpx;
  align-items: around
}
4 回复

兄dei,赶紧去百度一下flex布局,为以后的grid布局打打基础

谢谢大家的指导,现在已经可以这样了

再请教一下大佬们,如果用flex布局的时候,我想把两个icon的间距 变成这样  < > with ❤️by Andy…,需要如何布局呢?用了space-evenly,也不太对。谢谢各位了

在最外面套一个大盒子 用

display: flex;

align-items: center;

就可以一行居中了

试下flex布局

回到顶部