微信小程序个人中心的列表控件实现代码
时间:2020-10-02 10:20:58|栏目:JavaScript代码|点击: 次
个人中心的列表控件
首先来看效果图

wxml
<view class="list-item"> <image class="item-image" src="../images/fuwu.png"></image> <text class="item-text">我的收藏</text> <image class="image-jiantou" src="../images/jiantou.png"></image> </view> <view class="line"></view>
wxss
.list-item {
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
height: 80rpx;
margin-top: 10rpx;
position: relative; /*父元素位置要设置为相对*/
}
.item-image {
width: 50rpx;
height: 50rpx;
margin: 20rpx;
}
.item-text {
color: gray;
font-size: 35rpx;
margin-left: 20rpx;
}
.image-jiantou {
width: 20rpx;
height: 35rpx;
position: absolute; /* 要约束所在位置的子元素的位置要设置成绝对 */
right: 0; /* 靠右调节 */
margin-right: 35rpx
}
.line {
width: 100%;
height: 3rpx;
background: lightgray;
margin-left: 90rpx;
}
上一篇:javascript实现youku的视频代码自适应宽度
栏 目:JavaScript代码
下一篇:JS实现简单短信验证码界面
本文标题:微信小程序个人中心的列表控件实现代码
本文地址:http://www.codeinn.net/misctech/6054.html






