302 lines
5.9 KiB
CSS
302 lines
5.9 KiB
CSS
/* 页面壳 + 三种顶栏(刘海屏 / 胶囊适配) */
|
|
|
|
.page-shell {
|
|
min-height: 100vh;
|
|
background: var(--color-background);
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.page-shell--tab {
|
|
padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
|
|
}
|
|
|
|
/* 小程序原生 tabBar 页面窗口已扣除底栏,避免滑到底多余空白 */
|
|
.page-shell--tab.page-shell--native-tabbar {
|
|
padding-bottom: 12px;
|
|
}
|
|
|
|
.page-shell--scroll,
|
|
.page-shell--sub,
|
|
.page-shell--plain {
|
|
padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
|
|
}
|
|
|
|
.page-shell--fixed-footer {
|
|
padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
|
|
}
|
|
|
|
/* 无自定义 Tab 顶栏:贴顶(标题走小程序/H5 系统导航栏) */
|
|
.page-shell.no-tab-header,
|
|
.page-shell.h5-no-tab-header {
|
|
--nav-bar-height: 0px;
|
|
--nav-status-bar-height: 0px;
|
|
--nav-content-height: 0px;
|
|
}
|
|
|
|
.page-shell.no-tab-header .home-aroma-nav,
|
|
.page-shell.h5-no-tab-header .home-aroma-nav {
|
|
top: 0;
|
|
}
|
|
|
|
.tab-main-header__content {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
width: 100%;
|
|
}
|
|
|
|
.tab-main-header__title {
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
top: var(--nav-status-bar-height);
|
|
height: var(--nav-content-height);
|
|
line-height: var(--nav-content-height);
|
|
text-align: center;
|
|
padding: 0 48px;
|
|
box-sizing: border-box;
|
|
font-family: var(--font-headline);
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
color: var(--color-heritage-red);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
pointer-events: none;
|
|
z-index: 1;
|
|
}
|
|
|
|
.tab-main-header__extra {
|
|
position: absolute;
|
|
right: 0;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
max-width: 40vw;
|
|
}
|
|
|
|
.tab-main-header__extra-inner {
|
|
display: flex;
|
|
align-items: center;
|
|
color: var(--color-heritage-red);
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.tab-main-header__extra-inner .tab-main-city-label {
|
|
margin-left: 4px;
|
|
}
|
|
|
|
/* ── 滚动透明顶栏(商品/门店详情) ── */
|
|
.page-nav-bar {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
z-index: 50;
|
|
background: transparent;
|
|
box-sizing: border-box;
|
|
transition: background 0.3s, box-shadow 0.3s;
|
|
}
|
|
|
|
.page-nav-bar--solid {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.page-nav-bar__content {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
width: 100%;
|
|
}
|
|
|
|
.page-nav-bar__btn {
|
|
position: absolute;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 999px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: rgba(255, 255, 255, 0.8);
|
|
flex-shrink: 0;
|
|
z-index: 2;
|
|
}
|
|
|
|
.page-nav-bar__btn--back {
|
|
left: 0;
|
|
}
|
|
|
|
.page-nav-bar__btn--right {
|
|
left: auto;
|
|
right: 0;
|
|
}
|
|
|
|
/* 右侧操作槽:固定贴着内容区右缘(内容区已用 navBarPaddingRight 避让微信菜单) */
|
|
.page-nav-bar__right-slot {
|
|
position: absolute;
|
|
top: 50%;
|
|
right: 0;
|
|
transform: translateY(-50%);
|
|
z-index: 2;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.page-nav-bar__right-slot .page-nav-bar__btn {
|
|
position: relative;
|
|
top: auto;
|
|
left: auto;
|
|
right: auto;
|
|
transform: none;
|
|
}
|
|
|
|
.page-nav-bar--solid .page-nav-bar__btn {
|
|
background: transparent;
|
|
}
|
|
|
|
.page-nav-bar__btn--placeholder {
|
|
background: transparent;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.page-nav-bar__icon {
|
|
font-size: 32px;
|
|
line-height: 1;
|
|
color: var(--color-ink-black);
|
|
font-weight: 300;
|
|
margin-top: -2px;
|
|
}
|
|
|
|
.page-nav-bar__icon--share {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* 小程序分享 Button 去默认样式,对齐圆形胶囊按钮 */
|
|
.page-nav-bar__share-btn {
|
|
padding: 0 !important;
|
|
margin: 0 !important;
|
|
border: none !important;
|
|
line-height: 1 !important;
|
|
background: rgba(255, 255, 255, 0.8) !important;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.page-nav-bar__share-btn::after {
|
|
border: none !important;
|
|
}
|
|
|
|
.page-nav-bar--solid .page-nav-bar__share-btn {
|
|
background: transparent !important;
|
|
}
|
|
|
|
.page-nav-bar__title {
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
top: var(--nav-status-bar-height);
|
|
height: var(--nav-content-height);
|
|
line-height: var(--nav-content-height);
|
|
text-align: center;
|
|
padding: 0 88px 0 56px;
|
|
box-sizing: border-box;
|
|
opacity: 0;
|
|
font-family: var(--font-headline);
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
color: var(--color-ink-black);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
transition: opacity 0.3s;
|
|
pointer-events: none;
|
|
z-index: 1;
|
|
}
|
|
|
|
.page-nav-bar__title--visible {
|
|
opacity: 1;
|
|
}
|
|
|
|
.page-with-nav-bar {
|
|
padding-top: var(--nav-bar-height, 56px);
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* ── 子页面固定实底顶栏 ── */
|
|
.sub-page-header {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 50;
|
|
background: var(--color-background);
|
|
box-shadow: var(--shadow-card);
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.sub-page-header__content {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
width: 100%;
|
|
}
|
|
|
|
.sub-page-header__title {
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
top: var(--nav-status-bar-height);
|
|
height: var(--nav-content-height);
|
|
line-height: var(--nav-content-height);
|
|
text-align: center;
|
|
padding: 0 48px;
|
|
box-sizing: border-box;
|
|
font-family: var(--font-headline);
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
color: var(--color-heritage-red);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
pointer-events: none;
|
|
z-index: 1;
|
|
}
|
|
|
|
.sub-page-header__back {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
width: 40px;
|
|
height: 40px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 2;
|
|
}
|
|
|
|
.sub-page-header__back-icon {
|
|
font-size: 32px;
|
|
line-height: 1;
|
|
color: var(--color-heritage-red);
|
|
font-weight: 300;
|
|
margin-top: -2px;
|
|
}
|
|
|
|
.sub-page-header__right {
|
|
position: absolute;
|
|
right: 0;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
z-index: 2;
|
|
}
|
|
|
|
.sub-page-body {
|
|
padding-top: 12px;
|
|
box-sizing: border-box;
|
|
}
|