当前位置:网站首页>微信小程序禁止页面左右滑动
微信小程序禁止页面左右滑动
2022-08-09 14:55:00 【写的都是BUG】
小程序禁止页面左右滑动
1、页面中view设置width:100%之后,页面右边会多出一块白区域,并且可以左右滑动,解决方法是给这个view加一个box-sizing:border-box;
2、直接给最外层的view设置一个overflow-x:hidden; //裁剪 div 元素中内容的左/右边缘 - 如果溢出元素的内容区域的话进行隐藏
3、在json文件里面加 "disableScroll": true
4、给page一个弹性盒子
page {
width: 100%;
display: flex;
}
然后将page下面的根元素盒子宽度设为100%,overflow: hidden
.bd {
width: 100%;
overflow: hidden;
}
这样就不会出现左滑右滑出现白屏现象了
边栏推荐
- 利用qrcode组件实现图片转二维码
- How to achieve stable profit through the stock quantitative trading interface?
- crontab失效怎么解决
- 如何正确使用防关联浏览器
- What drives the development of quantitative trading interfaces?
- What do professional quantitative traders think about quantitative trading?
- 众所周知亚马逊是全球最大的在线电子商务公司。如今,它已成为全球商品种类最多的在线零售商,日活跃买家约为20-25亿。另一方面,也有大大小小的企业,但不是每个人都能赚到刀! 做网店的同学都知道,
- The difference between show and exec in Qt dialog
- 排序方法(希尔、快速、堆)
- 写在光学之前--振动和波
猜你喜欢
随机推荐
Qt对话框中show和exec的区别
What are the hot topics in quantitative programmatic trading?
bin document read and write
如何选择可靠的亚马逊代运营
Example of file operations - downloading and merging streaming video files
Several important functional operations of general two-way circular list
正则化原理的简单分析(L1/L2正则化)
LNK1123:转换到COFF期间失败:文件无效或损坏
Common compilation problems
A shortcut method for writing menu commands in C
小型项目如何使用异步任务管理器实现不同业务间的解耦
In the process of quantitative trading, retail investors can do this
stream去重相同属性对象
相干光(光学)
ASP.Net Core实战——使用Swagger
Noun concept summary (not regularly updated ~ ~)
鸡生蛋,蛋生鸡问题。JS顶级对象Function,Object关系
【C语言初阶】详解分支语句
Servlet life cycle
跨平台桌面应用 Electron 尝试(VS2019)