当前位置:网站首页>UNI-APP_iphone bottom safe area
UNI-APP_iphone bottom safe area
2022-08-11 03:32:00 【small crooked | front end】
The item needs to make a fixed button at the bottom (above the tabbar), and the style is no problem under normal mobile phones.Under iPhone xr and iphone11, the location is incorrect. The problem is that the iphone has an additional safe area problem
Probably this one.It is also included in the height of the entire page. If this height is not added, the fixed positioning position will be lower than the original one (so, the project still needs to be tested on the real machine to be accurate, and the simulator cannot be measured accurately).
Solution: https://ask.dcloud.net.cn/article/36494
padding-bottom: constant(safe-area-inset-bottom);padding-bottom: env(safe-area-inset-bottom);Explain a description: var(–safe-area-inset-bottom) The height of the safe area, directly with the unit (px), only the mobile phone with the safe area has this value, the others are 0
ps:var(--safe-area-inset-bottom) This attribute only works in js and html styles.** (I have tried it briefly, and how to write it can be used in js and html styles.This is unknown, if anyone knows, please leave a message, thank you!) **
If you want to fix the positioning at the bottom
.bottom{bottom: env(safe-area-inset-bottom);}/*If you want to be above the tabbar, add the height of the tabbar, for example, the height of the tabbar is 120rpx*/.bottom{bottom: calc(120rpx + env(safe-area-inset-bottom));}边栏推荐
- 电力机柜数据监测RTU
- STC8H开发(十五): GPIO驱动Ci24R1无线模块
- 【FPGA】名词缩写
- [DB operation management/development solution] Shanghai Daoning provides you with an integrated development tool to improve the convenience of work - Orange
- 音视频开发,为什么要学习FFmpeg?应该怎么入手FFmpeg学习?
- Detailed explanation of VIT source code
- 高校就业管理系统设计与实现
- The 125th day of starting a business - a note
- 程序化交易改变了什么?
- 图解LeetCode——640. 求解方程(难度:中等)
猜你喜欢
![[yu gong series] Go program 035-08 2022 interfaces and inheritance and transformation and empty interface](/img/cb/41e5f553b0b776dccf0e39f9bf377f.png)
[yu gong series] Go program 035-08 2022 interfaces and inheritance and transformation and empty interface

2022-08-10 The sixth group Hiding spring study notes

JS-DOM element object

基于改进YOLOv5轻量化的烟火检测

Is Redis old?Performance comparison between Redis and Dragonfly

font

互换性测量技术-几何误差

Multi-merchant mall system function disassembly 26 lectures - platform-side distribution settings

"Life Is Like First Seen" is ill-fated, full of characters, and the contrast of Zhu Yawen's characters is too surprising

C语言之自定义类型------结构体
随机推荐
flink The object probably contains or references non serializable fields.
(CVPR - 2017) in depth and potential body learning context awareness feature for pedestrian recognition
【FPGA】名词缩写
uni-app - 城市选择索引列表 / 通过 A-Z 排序的城市列表(uview 组件库 IndexList 索引列表)
大马驮2石粮食,中马驮1石粮食,两头小马驮一石粮食,要用100匹马,驮100石粮食,如何分配?
Typescript study notes | Byte Youth Training Notes
flink The object probably contains or references non serializable fields.
QueryDet:级联稀疏query加速高分辨率下的小目标检测
IDE compilation error: Dangling metacharacter
一次简单的 JVM 调优,学会拿去写到简历里
【Yugong Series】August 2022 Go Teaching Course 036-Type Assertion
What is third-party payment?
Is there any way for kingbaseES to not read the system view under sys_catalog by default?
CTO说MySQL单表行数不要超过2000w,为啥?
Qnet Weak Network Test Tool Operation Guide
AI+Medical: Using Neural Networks for Medical Image Recognition and Analysis
AI + medical: for medical image recognition using neural network analysis
A simple JVM tuning, learn to write it on your resume
What kind of programming trading strategy types can be divided into?
Meaning of df and df -lh