antd-mobile
Version:
<img src="https://gw.alipayobjects.com/mdn/rms_ee68a8/afts/img/A*hjjDS5Yy-ooAAAAAAAAAAAAAARQnAQ" alt="logo" width="100%" />
85 lines (74 loc) • 1.55 kB
CSS
.adm-side-bar {
--height: 100%;
--width: 210px;
--item-border-radius: 16px;
--background-color: #f5f5f5;
width: var(--width);
height: var(--height);
box-sizing: border-box;
font-size: 26px;
overflow-y: auto;
transform: translateZ(0);
-webkit-transform: translateZ(0);
background-color: var(--background-color);
display: flex;
flex-direction: column;
}
.adm-side-bar-items {
flex: none;
overflow: hidden;
}
.adm-side-bar-extra-space {
flex: auto;
overflow: hidden;
position: relative;
}
.adm-side-bar-item {
display: flex;
align-items: center;
box-sizing: border-box;
padding: 32px 24px;
position: relative;
cursor: pointer;
background-color: var(--background-color);
overflow: visible;
}
.adm-side-bar-item-highlight {
position: absolute;
height: 100%;
width: 4px;
left: -24px;
top: 0;
background: var(--adm-color-primary);
border-radius: 4px;
}
.adm-side-bar-item-active {
color: var(--adm-color-primary);
background-color: var(--adm-color-white);
position: relative;
}
.adm-side-bar-item-corner {
width: var(--item-border-radius);
height: var(--item-border-radius);
position: absolute;
z-index: 100;
right: 0;
user-select: none;
pointer-events: none;
}
.adm-side-bar-item-corner-top {
top: 0;
transform: rotate(-90deg);
}
.adm-side-bar-item-corner-bottom {
bottom: 0;
}
.adm-side-bar-item-disabled {
cursor: not-allowed;
}
.adm-side-bar-item-disabled .adm-side-bar-item-title {
opacity: 0.4;
}
.adm-side-bar-badge.adm-badge {
--right: -8px;
}