magiccube-vue3
Version:
vue3-js版组件库
72 lines (62 loc) • 1.55 kB
text/less
@import './theme';
.mc-dropdown-panel{
position: fixed;
z-index: @popup-z;
background: #fff;
border-radius: var(--mc-float-layer-border-radius);
box-shadow: var(--mc-float-layer-box-shadow);
transform-origin: top;
transition: transform 200ms;
opacity: 0;
&.reverse{
transform-origin: bottom;
&::before{
content: '';
bottom: -6px;
top: unset;
transform: rotate(-180deg);
}
&::after{
content: '';
bottom: -6px;
top: unset;
transform: rotate(-180deg);
}
}
&.slide-down{
transform: scaleY(1);
opacity: 1;
}
&.slide-up{
transform: scaleY(0);
opacity: 1;
}
&__arrow{
position: fixed;
top: 0;
left: 0;
&::before{
content: '';
position: absolute;
top: -8px;
left: 50%;
transform: translateX(-50%);
border-left: 6px solid transparent;
border-bottom: 6px solid rgba(0, 0, 0, 0.06);
border-right: 6px solid transparent;
}
&::after{
content: '';
position: absolute;
top: -6px;
left: 50%;
transform: translateX(-50%);
border-left: 6px solid transparent;
border-bottom: 6px solid #fff;
border-right: 6px solid transparent;
}
}
}
.mc-dropdown-component{
position: relative;
}