微信小程序個人中心的列表控件實現(xiàn)代碼
更新時間:2020年04月26日 11:52:11 作者:wy313622821
這篇文章主要介紹了微信小程序個人中心的列表控件實現(xiàn)代碼,本文通過實例代碼給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下
個人中心的列表控件
首先來看效果圖
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; /* 靠右調(diào)節(jié) */ margin-right: 35rpx } .line { width: 100%; height: 3rpx; background: lightgray; margin-left: 90rpx; }
到此這篇關(guān)于微信小程序個人中心的列表控件實現(xiàn)代碼的文章就介紹到這了,更多相關(guān)微信小程序個人中心內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
JavaScript之iterable_動力節(jié)點Java學院整理
這篇文章主要介紹了JavaScript之iterable,遍歷Array可以采用下標循環(huán),遍歷Map和Set就無法使用下標。為了統(tǒng)一集合類型,ES6標準引入了新的iterable類型,Array、Map和Set都屬于iterable類型2017-06-06