当前位置:网站首页>关于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导航栏遮挡的问题!
真的是一次非常好的经验。
边栏推荐
- Actual target shooting - skillfully use SMB to take down the off-line host
- timer使用备注
- 光照使用的简单总结
- Overview of C program operation mechanism
- 10. Tencent cloud IOT device side learning - firmware upgrade
- 日期、时间库使用备注
- 线程注意事项
- RDD的执行原理
- The seminar on "global IPv6 development and outlook 2020-2021" was held in Beijing
- Global and Chinese markets for food puffers 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢

相機標定(標定目的、原理)
![[pointnet] matlab simulation of 3D point cloud target classification and recognition based on pointnet](/img/86/5db689cdac2a927a23dff3fb9594b0.png)
[pointnet] matlab simulation of 3D point cloud target classification and recognition based on pointnet
![LeetCode 515 在每个数行中找最大值[BFS 二叉树] HERODING的LeetCode之路](/img/16/011ba3aef1315c39526daac7e3ec89.png)
LeetCode 515 在每个数行中找最大值[BFS 二叉树] HERODING的LeetCode之路

Description of module data serial number positioning area code positioning refers to GBK code

Blue Bridge Cup seven segment code (dfs/ shape pressing + parallel search)

【008】表格数据逐行筛选,跳出for循环及跳过本次循环思路_#VBA
![[frame rate doubling] development and implementation of FPGA based video frame rate doubling system Verilog](/img/38/92486c92557e6e5a10a362eb2b7bdf.png)
[frame rate doubling] development and implementation of FPGA based video frame rate doubling system Verilog

LeetCode 207:课程表(拓扑排序判断是否成环)

Maxcompute remote connection, uploading and downloading data files

exness:鲍威尔坚持抗通胀承诺,指出衰退是可能的
随机推荐
线程的阻塞问题
洛谷 P1051 谁拿了最多奖学金
What is a CC attack? How to judge whether a website is attacked by CC? How to defend against CC attacks?
How to delete / select an input method on your computer
What challenges does the video streaming media platform face in transmitting HD video?
鸿蒙os开发三
Exploration on Optimization of elastic expansion engineering
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
How to open the soft keyboard in the computer, and how to open the soft keyboard in win10
Global and Chinese markets for maritime transport of perishable goods 2022-2028: Research Report on technology, participants, trends, market size and share
tuple(元组)备注
A penetration test of c/s Architecture - Request encryption, decryption and test
Deploy L2TP in VPN (medium)
Accessing user interface settings using systemparametersinfo
get_ started_ 3dsctf_ two thousand and sixteen
Win10 build webservice
10. Tencent cloud IOT device side learning - firmware upgrade
MySQL case: analysis of full-text indexing
[wustctf2020] climb
[pointnet] matlab simulation of 3D point cloud target classification and recognition based on pointnet