当前位置:网站首页>Implementation of slider view
Implementation of slider view
2022-06-23 05:10:00 【richest_ qi】
List of articles
Applet project
The files involved in the code are
- app.json
- pages/index/index.wxml
- pages/index/index.wxss
- static/images( Create a new directory under the applet root directory :static,static Create a new subdirectory :images, Used to store still pictures )

app.json
{
"pages":[
"pages/index/index"
],
"window":{
"navigationBarBackgroundColor": "#1c424d",
"navigationBarTitleText": "AITO",
"navigationBarTextStyle":"white"
},
"style": "v2",
"sitemapLocation": "sitemap.json"
}
pages/index/index.wxml
<view class="container">
<scroll-view class="list" enable-flex scroll-x>
<view class="item">
<image src="/static/images/aito-m5.jpg"></image>
<text>AITO Ask boundary M5, Line unbounded , Chi Qianli </text>
</view>
<view class="item">
<image src="/static/images/m5.jpg"></image>
<text> Pioneer first show , Perform smart luxury </text>
</view>
<view class="item">
<image src="/static/images/aito-wenjie-m5.jpg"></image>
<text> Born strong , Just for freedom . Master start , Travel far and near </text>
</view>
<view class="item">
<image src="/static/images/m7.jpg"></image>
<text> Ask boundary M7, Luxury smart large electric SUV</text>
</view>
<view class="item">
<image src="/static/images/aito.jpg"></image>
<text>AITO, Drive more energy with grace </text>
</view>
</scroll-view>
</view>
pages/index/index.wxss
.container{
padding: 20rpx;
}
.list{
display: flex;
}
.item{
width: 200rpx;
margin-right: 20rpx;
}
.item image{
width: 200rpx;
height: 112rpx;
border-radius: 10rpx;
}
.item text{
font-size: 26rpx;
/* Multi line text overflow , Ellipsis instead */
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
scroll-view Components
scroll-view It can realize a scrollable view area .
scroll-view Components have many properties , Commonly used :
enable-flex, Is it enabled? flex Layout , Only enable ,display:flexWill take effect . Boolean value , The default isfalse, That is, it is not enabled by default flex Layout .scroll-x, Whether horizontal scrolling is allowed . Boolean value , The default isfalse, That is, horizontal scrolling is not allowed by default .
边栏推荐
- QT elidedtext only works for Chinese conformity, but not for English
- MySQL存储过程
- 【图像融合】基于非凸罚分的稀疏正则化实现图像融合附matlab代码
- Learn to draw Er graph in an article
- 直接插入排序——【常见排序法(1/8)】
- [MAC] there is no source option in security and privacy
- How to better organize the minimum web api code structure
- 飞桨框架v2.3发布高可复用算子库PHI!重构开发范式,降本增效
- 微信小程序:土味情话恋爱话术
- Li Kou today's question 513 Find the value in the lower left corner of the tree
猜你喜欢

代码片段管理器SnippetsLab

Meituan's good article: understand swift, Objective-C and the mixing mechanism from the perspective of precompiling

微信小程序:爱情保证书制作生成

HCIP第五次作业

Cloud native database is in full swing, and the future can be expected

工作5-8年的外包测试员,平均年薪有多少?

BGP实验

Laravel 8.4 routing problem. At the end is the cross reference table on the left side of the editor, which can be understood by Xiaobai

Learn to draw Er graph in an article

Brief ideas and simple cases of JVM tuning - why do you need JVM tuning?
随机推荐
ICer技能02makefile脚本自跑vcs仿真
Kail infiltration basic literacy basic command
apache atlas 快速入门
JDBC调用存储过程、MySQL触发器
当SBAS遇上rtklib
Decompile
dolphinscheduler 2.0.5 spark 任务测试总结(源码优化)
laravel8实现图片验证码
Getting started with the shutter AppBar
《微信小程序-基础篇》带你了解小程序的路由系统(二)
PRCS-1016 : Failed to resolve Single Client Access Name
【C语言】关键字
百度飞桨“万有引力”2022首站落地苏州,全面启动中小企业赋能计划
Do280openshift command and troubleshooting -- common troubleshooting and chapter experiments
Servlet self study notes
618如何冲出重围?海尔智家:做好用户的数字化
[MAC] there is no source option in security and privacy
centos7部署docker,安装mysql
Thinkphp6 solving jump problems
TabControl style of WPF basic control