需要实现如下效果:

WXML代码如下:
<view class='evaluationContentItemLayout'>
<text class='evaluationContentText'>{{item.name}}({{item.total}})</text>
<progress class='evaluationContentProgress' percent='{{item.progress}}' stroke-width='26' backgroundColor='#fff' color='#09BB07'></progress>
</view>
WXSS代码如下:
.evaluationContentItemLayout{
width: auto;
height: auto;
position: relative;
}
.evaluationContentText {
font-size: 28rpx;
color: #101010;
position: absolute;
margin-left: 10rpx;
top: 5rpx;
}
.evaluationContentProgress{
}
最终效果:
颜色效果比较容易实现,故未做记录。

本文介绍如何使用WXML和WXSS代码创建一个带有文本和进度条的布局组件,展示了具体的代码实现,包括如何设置字体大小、颜色、位置及进度条样式。
2034

被折叠的 条评论
为什么被折叠?



