实现效果如下:

实现代码如下:

index.wxml:

<!--index.wxml-->
<view class="container">
<view class = "selection">
<swiper indicator-dots="true"
autoplay="true" interval="" duration="">
<block wx:for="{{imgUrls}}">
<swiper-item>
<image src="{{item}}" class="slide-image" width="" height=""/>
</swiper-item>
</block>
</swiper>
</view> <view class = "selection">
<view class = "header">
<text>精品推荐</text>
<text class = "all_text">精品推荐</text>
</view> <view class = "content">
<!--for循环-->
<view class = "content_item" wx:for = "{{content_item}}">
<image src="../../images/3.png"/>
<view class = "text_item">
<text>我是标题哟哟!!!</text>
</view>
</view>
</view>
</view> <view class = "selection">
<view class = "header">
<text>热门评测</text>
<text class = "all_text">全部评测</text>
</view> <view class = "list_item" wx:for = "{{list_item}}">
<view class = "big_image">
<image src="../../images/4.png" class = "big_image"/>
<image src="../../images/2.png" class = "avater" />
</view>
<view class = "list_item_title_text">
<text>思思思思思思思思思思思思思思思思思思思思思思思思思思</text>
</view>
<view class = "list_item_content_text">
<text>思思思思思思思思思思思思思思思思思思思</text>
</view>
</view>
</view>
</view>

index.wxss:

.header{
border-left-width: 2px;
border-left-color: green;
border-left-style: solid;
/*flex布局*/
display: flex;
/*两端对齐*/
justify-content: space-between;
/*居中对齐*/
align-content: center;
padding-left: 10rpx;
padding-right: 10rpx;
margin-top: 10rpx;
margin-bottom: 10rpx;
} .all_text{
color: green;
font: 10px;
} .content{
display: flex;
/*换行*/
flex-wrap: wrap;
/*方向*/
flex-direction: row;
/*水平方向居中对齐*/
justify-content: center;
} .content_item{
width: %;
height: 250rpx;
background-color: darkgoldenrod;
margin: 5px;
/*绝对定位*/
position: relative;
} /*设置图片样式*/
.content_item image{
width: %;
height: %;
} .text_item text{
/*相对布局*/
position: absolute;
bottom: 0px;
color: white;
font: 10px;
/*设置渐变 参数一:从哪开始,参数二:设置颜色 黑色 参数三:到哪哪 透明*/
background: -webkit-linear-gradient(bottom,rgba(, , , 0.5),rgba(, , , ));
height: 125rpx;
width: %;
display: flex;
flex-direction: column;
justify-content: flex-end;
padding-left: %;
padding-right: %;
} /*列表*/
.list_item{
height: 500rpx;
width: %;
/*position: relative;*/
background: gainsboro;
} .big_image{
height: 300rpx;
width: %;
position: relative;
} /*列表大图*/
/*.big_image image{
height: 100%;
width: 100%;
}*/
/*.big_image{
height: 100%;
width: 100%;
}*/ .list_item_text text{
height: 200rpx;
width: %;
} .avater{
height: 100rpx;
width: 100rpx;
/*弧度*/
border-radius: %;
bottom: -50rpx;
right: 50rpx;
/*绝对定位*/
position: absolute;
} .list_item_title_text{ color: black;
font: 15px;
margin-top: 70rpx;
padding-left: 10rpx;
padding-right: 10rpx;
} .list_item_content_text{
color: lightgray;
font: 8px;
padding-left: 10rpx;
padding-right: 10rpx;
margin-top: 10rpx;
}

里面有设置相应代码注释哟!!!一起学习..加油!!!

最新文章

  1. C站投稿189网盘视频源(UP主篇)
  2. SharePoint 2010 + 左侧导航(Left Nav Bar)二级菜单的修改
  3. 正则表达式regex狂记
  4. Linux 进程间通信(一)
  5. Delphi经验总结(3)
  6. Powershell 条件操作符
  7. shell 实例学习
  8. C++反汇编第二讲,不同作用域下的构造和析构的识别
  9. git操作+一个本地项目推到github上+注意
  10. P3224 [HNOI2012]永无乡
  11. kafka+storm结合存在的一些问题与解决方法
  12. 验证时出错。HRESULT = &amp;#39;8000000A&amp;#39;
  13. 【转】Java学习:Java中的线程之线程间的通信
  14. 关于metaspolit中进行JAVA反序列化渗透RMI的原理分析
  15. LOJ6500. 「雅礼集训 2018 Day2」操作(哈希+差分)
  16. C#反射动态调用dll中的方法及使用QuartZ.net实现作业调度
  17. Why do Antennas Radiate?
  18. 动态规划:数位DP
  19. Visual Studio - 引入动态库
  20. hadoop中compare函数

热门文章

  1. python中的else语句
  2. django 自带认证系统(login,logout,authenticate,login_required)
  3. Linux文件类型和文件相关命令
  4. UVA - 11996 Jewel Magic (Treap+二分哈希)
  5. Observer-Proxy拦截器 -ES6
  6. linux 查找某文件所在路径
  7. 局域网 ARP 欺骗原理详解
  8. BatchNormalization、LayerNormalization、InstanceNorm、GroupNorm、SwitchableNorm总结
  9. java.lang.Integer.MAX_VALUE;这是什么意思?
  10. SpringBoot导入导出Excel到Mysql