Files
YGChatCS/src/components/TopNavBar/styles/index.scss

50 lines
798 B
SCSS

// TopNavBar 组件样式
.top-nav-bar {
width: 100%;
background-color: $theme-color-100;
&--fixed {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 999;
}
}
.nav-bar-left,
.nav-bar-right {
width: 30px;
height: 30px;
}
.nav-bar-center {
flex: 1;
height: 30px;
padding: 0 20px; // 为左右按钮留出空间
// 居中对齐(默认)
&--center {
justify-content: center;
.nav-bar-title {
text-align: center;
}
}
// 左对齐
&--left {
justify-content: flex-start;
padding-left: 20px; // 为返回按钮留出更多空间
.nav-bar-title {
text-align: left;
}
}
}
// 固定导航栏时的页面内容适配
.page-with-fixed-navbar {
padding-top: calc(var(--status-bar-height, 44px) + 44px);
}