|
@@ -0,0 +1,24 @@
|
|
|
|
|
+/* iOS 安全区变量(兼容老版本 iOS 的 constant 写法) */
|
|
|
|
|
+:root {
|
|
|
|
|
+ --safe-top: constant(safe-area-inset-top);
|
|
|
|
|
+ --safe-top: env(safe-area-inset-top);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* 修正 Vant NavBar 在 fixed + placeholder 场景下的真实高度与占位高度 */
|
|
|
|
|
+.invoice-page {
|
|
|
|
|
+ /* 让页面背景延展到安全区背后,避免出现“露底色”的条带 */
|
|
|
|
|
+ background: #f5f6f8;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* ① 导航条本体:加上安全区内边距并增高整体高度 */
|
|
|
|
|
+.van-nav-bar.van-nav-bar--fixed {
|
|
|
|
|
+ padding-top: var(--safe-top); /* 让标题避开刘海 */
|
|
|
|
|
+ height: calc(46px + var(--safe-top)) !important; /* 46px 为 Vant 默认高度 */
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* ② placeholder:高度与导航条保持一致(关键修复点) */
|
|
|
|
|
+.van-nav-bar__placeholder {
|
|
|
|
|
+ height: calc(46px + var(--safe-top)) !important;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/* ③ 若你在别处又给了全局 safe-area 顶部 padding,可去掉,避免“双倍间距” */
|