In flex layout, the width and height of the container are set to 100% respectively, and the width and height of the child element image are set to 200rpx; the width and height of the parent element follow the child element, and there is no 100% effect.
陈金宇
陈金宇 2018-06-13 09:52:07
0
0
1023

wxml:

<view class='tz'>

 <image class='tz-image' src='../../image/tz.png'></image>

 <text class='tz-text'>欢迎来到***平台</text>

wxss:


.tz{

 width: 100%;

 height: 100%;

 display: flex;

 background: rebeccapurple;

 margin: 5rpx;


}

.tz-image{

 width: 200rpx;

 height: 200rpx;

}

.tz-text{

 background: red;

 }

</view>




陈金宇
陈金宇

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template