本文给大家带来的是微信小程序选车中心车型大全展示列表页面样式设计制作开发教程,制作好以后效果图如下:
一、wxml页面代码如下:
<view class="container">
<view id="car_title_cont">
<text id="car_title">超跑阵容</text>
</view>
<view class="car_names">法拉利</view>
<view class="img_cont">
<swiper class="img_pic">
<block>
<swiper-item>
<image src="http://img1.xcarimg.com/b70/s8124/c_20160708111430452859370711393.jpg" style="width: 100% height: 100%;"></image>
</swiper-item>
</block>
</swiper>
</view>
<view class="car_names">兰博基尼</view>
<view class="img_cont">
<swiper class="img_pic">
<block>
<swiper-item>
<image src="http://img1.xcarimg.com/b67/s6633/c_20150710104510986162680120832.jpg" style="width: 100% height: 100%;"></image>
</swiper-item>
</block>
</swiper>
</view>
<view class="car_names">迈凯伦</view>
<view class="img_cont">
<swiper class="img_pic">
<block>
<swiper-item>
<image src="http://img1.xcarimg.com/b226/s6991/c_20150629145006087467591186056.jpg" style="width: 100% height: 100%;"></image>
</swiper-item>
</block>
</swiper>
</view>
</view>
|
二、wxss样式文件代码如下:
.container {
margin: 0 6px;
}
#car_title_cont {
margin-top: 5px;
border-bottom: 1px solid #E0E0E0;
}
#car_title {
color: black;
font-style: oblique;
font-size: 18px;
font-weight: bold;
}
.car_names {
color: #888888;
font-size: 15px;
font-weight: bold;
margin: 10px 0;
}
.img_cont {
margin: 10px;
height: 225px;
width: auto;
}
.img_pic {
width: 100%;
height: 225px;
}
|