当前位置:网站首页>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));}边栏推荐
- FTP错误代码列表
- EasyCVR接入GB28181设备时,设备接入正常但视频无法播放是什么原因?
- Roewe imax8ev cube battery security, what blackening and swelling are hidden behind it?
- uni-app - 城市选择索引列表 / 通过 A-Z 排序的城市列表(uview 组件库 IndexList 索引列表)
- Idea (preferred) cherry-pick operation
- LeetCode Hot Questions (12. The Best Time to Buy and Sell Stocks)
- Leetcode 669. 修剪二叉搜索树
- 轮转数组问题:如何实现数组“整体逆序,内部有序”?“三步转换法”妙转数组
- AI + medical: for medical image recognition using neural network analysis
- 程序化交易的策略类型可以分为哪几种?
猜你喜欢

索引的创建、查看、删除

STC8H development (15): GPIO drive Ci24R1 wireless module

没想到MySQL还会问这些...

树莓派入门(5)系统备份

The last update time of the tables queried by the two nodes of the rac standby database is inconsistent

Kubernetes集群搭建Zabbix监控平台

Detailed explanation of VIT source code

Official release丨VS Code 1.70

How does MSP430 download programs to the board?(IAR MSPFET CCS)

二叉树相关代码题【较全】C语言
随机推荐
Is Redis old?Performance comparison between Redis and Dragonfly
The development of the massage chair control panel makes the massage chair simple and intelligent
作业8.10 TFTP协议 下载功能
How to rebuild after pathman_config and pathman_config_params are deleted?
AI+医疗:使用神经网络进行医学影像识别分析
【FPGA】名词缩写
uni-app - 城市选择索引列表 / 通过 A-Z 排序的城市列表(uview 组件库 IndexList 索引列表)
Unity2D animation (1) introduction to Unity scheme - animation system composition and the function of use
音视频开发,为什么要学习FFmpeg?应该怎么入手FFmpeg学习?
高校就业管理系统设计与实现
浅析一下期货程序化交易好还是手工单好?
获取链表长度
EasyCVR接入海康大华设备选择其它集群服务器时,通道ServerID错误该如何解决?
A simple JVM tuning, learn to write it on your resume
The most unlucky and the luckiest
"Beijing-Taiwan high-speed rail" debuted on Baidu map, can it really be built in 2035?
Traversal of DOM tree-----modify styles, select elements, create and delete nodes
Build Zabbix Kubernetes cluster monitoring platform
When EasyCVR is connected to the GB28181 device, what is the reason that the device is connected normally but the video cannot be played?
Meaning of df and df -lh