当前位置:网站首页>关于h5页面苹果手机使用fixed定位tabbar最底部时遮挡内容问题
关于h5页面苹果手机使用fixed定位tabbar最底部时遮挡内容问题
2022-06-24 06:46:00 【张小浪】
在使用uni-app时,自己写了个底部tabbar导航栏,出现了tabbar遮挡内容的问题,如下图所示;

刚开始的时候,使用了顶部盒子padding-bottom 来时底部盒子撑开,在chrome浏览器中查看,效果无误
但是呢!!!
当任务数据一旦多了之后,还是会有遮挡问题,并且遮挡问题在ios也就是苹果手机上的浏览器中打开没有实现想要的效果;
百度多次查询文档,并没有发现可行的办法,最后是在微信的技术群里提出的问题,还好啊,三个技术群就一个正八经的能给你解答问题的,剩下的都是叫你去百度;
解决方法如下
其实也很简单,只不过对于我这个小白来说,解决了好半天;
看你的布局
我的布局是内容部分是个盒子,底部tabbar是个单独的盒子,然后外面用大盒子包裹起来的;
<div>
<div>内容</div>
<tabbar>导航栏</tabbar>
</div>因为我的是用uni-app写的,这里就大致列出一下
在这样的布局下,在内容部分使用伪元素::after{ }
将伪元素的高度给到和tabbar的高度一致,这样就撑开了整个底部盒子,这样就解决了ios页面tabbar导航栏遮挡的问题!
真的是一次非常好的经验。
边栏推荐
- What should I pay attention to after the live broadcast system source code is set up?
- Win10 build webservice
- Global and Chinese markets for maritime transport of perishable goods 2022-2028: Research Report on technology, participants, trends, market size and share
- How to select a third-party software testing company? 2022 ranking of domestic software testing institutions
- 【Django中运行scrapy框架,并将数据存入数据库】
- Global and Chinese market of offshore furnaces 2022-2028: Research Report on technology, participants, trends, market size and share
- 图形技术之坐标转换
- [从零开始学习FPGA编程-41]:视野篇 - 摩尔时代与摩尔定律以及后摩尔时代的到来
- Unity 的序列化
- A case of bouncing around the system firewall
猜你喜欢
![[vulhub shooting range]] ZABBIX SQL injection (cve-2016-10134) vulnerability recurrence](/img/c5/f548223666d7379a7d4aaed2953587.png)
[vulhub shooting range]] ZABBIX SQL injection (cve-2016-10134) vulnerability recurrence
╯︵ ┻━┻](/img/26/6986a8ae6c00eb2431a082dc0ff978.png)
[DDCTF2018](╯°□°)╯︵ ┻━┻

Analog display of the module taking software verifies the correctness of the module taking data, and reversely converts the bin file of the lattice array to display

Win11 points how to divide disks? How to divide disks in win11 system?

How to open the soft keyboard in the computer, and how to open the soft keyboard in win10
![[wustctf2020] climb](/img/b6/4a0582144c3125e7a0666bbbbfe29d.png)
[wustctf2020] climb

Accessing user interface settings using systemparametersinfo

相机标定(标定目的、原理)

图形技术之坐标转换

Combine with (& &) logic or (||), dynamic binding and ternary operation
随机推荐
Anaconda 中使用 You Get
UE常用控制台命令
How to realize multi protocol video capture and output in video surveillance system?
duilib 显示内存图片
get_ started_ 3dsctf_ two thousand and sixteen
Hubei College Upgraded to undergraduate - Hushi family planning department
报错“Computation failed in `stat_summary_hex()`”
[learn FPGA programming from scratch -42]: Vision - technological evolution of chip design in the "post Moorish era" - 1 - current situation
10 common malware detection and analysis platforms
[special session] SME growth plan - ECS special session
What should I pay attention to after the live broadcast system source code is set up?
简单的折射效果
bjdctf_ 2020_ babystack
When MFC uses the console, the project path cannot have spaces or Chinese, otherwise an error will be reported. Lnk1342 fails to save the backup copy of the binary file to be edited, etc
[机缘参悟-29]:鬼谷子-内揵篇-与上司交往的五种层次
A summary of the posture of bouncing and forwarding around the firewall
[从零开始学习FPGA编程-42]:视野篇 - 后摩尔时代”芯片设计的技术演进-1-现状
pair类备注
RDD basic knowledge points
[从零开始学习FPGA编程-41]:视野篇 - 摩尔时代与摩尔定律以及后摩尔时代的到来