当前位置:网站首页>uniapp中scroll-view的坑
uniapp中scroll-view的坑
2022-07-25 08:47:00 【丫霸902】
1.scroll-view为scroll-x="true"时
(1)scroll-view中的子元素,不能使用浮动float
(2)scroll-view中外层容器使用display:flex是无效的
(3)若想实现flex横向效果,请将需要滑动的子元素设置为display:inline-block并为其设置宽高
(4)外层容器添加属性 overflow:hidden;white-space:nowrap;
html代码
<scroll-view scroll-x="true" class="limit-act-con">
<view class="act-img" v-for="(item,index) in list3" :key="index">
<img :src="item" alt="">
</view>
</scroll-view>style代码
.limit-act-con {
overflow:hidden;
white-space:nowrap;
.act-img {
display: inline-block;
margin-right: 16rpx;
dislay:inline-block;
img {
width: 332rpx;
height: 160rpx;
border-radius: 20rpx;
}
}
}2.scroll-view为scroll-y="true"时
只需设置好外层容器的高度
边栏推荐
- Foundation 31: Selenium positioning dynamic ID element
- Wechat reservation of completed works of applet graduation project (4) opening report
- SSM+JSP+MYSQL实现的宠物领养收养管理系统源码
- Solving a random number problem
- Solutions to ten questions of leetcode database
- Eureka forced offline service
- PHP reports an error: classes\phpexcel\cell php Line(594) Invalid cell coordinate ESIGN1
- 51 MCU peripherals: Motor
- NVIDIA可编程推理加速器TensorRT学习笔记(二)——实操
- Blue and white porcelain used by Charles
猜你喜欢

这是我见过写得最烂的Controller层代码...

51 single chip microcomputer controls nixie tube display

Visual query (sp_helptext) -- quick query of stored procedures containing specified strings (with source code)

技术面②Mysql中的索引(index)类型有哪些并简要介绍一下?什么时候需要创建索引?什么时候不需要创建索引?为什么创建索引后查询速度会提高?

Dependency conflict resolution under idea

Rstudio shows that it can't connect to the web page, or it has a new website.

25 Ph.D. degrees revoked
![[ten thousand words long text] Based on LSM tree thought Net 6.0 C # realize kV database (case version)](/img/07/235785b7658b5ae022dfa3f53ec86d.png)
[ten thousand words long text] Based on LSM tree thought Net 6.0 C # realize kV database (case version)

Wechat reservation of small program completion works (5) assignment book of small program graduation project

Source code of short video live broadcast system
随机推荐
递归调用实现打印一个整数的每一位
Redis4.0.14 sentinel automatic failover failed
Arcgis10.2 installation tutorial
Freemaker template engine
Fundamentals of C language
IDEA下依赖冲突解决方法
read
Mogdb 3.0 how to add a standby database in the environment of one active and one standby
Graduation design of wechat small program ordering system of small program completion works (5) assignment
Redis learning
[untitled]
ip命令使用详解
Review the second time, 220614, video, day03_ Data warehouse design,
Idea starts the project slowly
Memcached data cache database (improve efficiency)
Redis学习笔记
Wechat reservation applet graduation design of applet completion works (3) background function
Leetcode · 83 biweekly race · 6129. Number of all 0 subarrays · mathematics
华为设备远程登录(Telnet、SSH)配置
Intelligent operation and maintenance scenario analysis: how to detect abnormal business system status through exception detection