antd-mobile
Version:
基于 React 的移动设计规范实现
89 lines (80 loc) • 1.6 kB
text/less
.@{modalPrefixClass} {
position: relative;
&-mask {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
height: 100%;
z-index: @modalZIndex;
background-color: @fill-overlay-inverse;
&-hidden {
display: none;
}
}
&-wrap {
position: fixed;
overflow: auto;
top: 0;
right: 0;
bottom: 0;
left: 0;
height: 100%;
z-index: @modalZIndex;
-webkit-overflow-scrolling: touch;
outline: 0;
.display-box();
align-items: center;
justify-content: center;
}
&&-transparent {
.@{modalPrefixClass}-content {
border-radius: @radius-lg;
height: auto;
padding-top: @v-spacing-lg;
.@{modalPrefixClass}-body {
padding: 0 @h-spacing-lg @v-spacing-lg;
}
}
}
&-title {
margin: 0;
font-size: @font-size-heading;
line-height: 1;
color: @color-text-base;
text-align: center;
}
&-header {
padding: @v-spacing-sm @h-spacing-lg @v-spacing-lg;
}
&-content {
position: relative;
background-color: @fill-base;
border: 0;
background-clip: padding-box;
text-align: center;
height: 100%;
}
&-close {
border: 0;
background: transparent;
font-size: @font-size-display-lg;
position: absolute;
left: @h-spacing-lg;
top: @v-spacing-md;
line-height: 1;
color: #bcbcbc;
text-decoration: none;
outline: none;
&-x:after {
content: '×';
font-weight: 100;
}
}
&-body {
font-size: @font-size-base;
color: @color-text-paragraph;
height: 100%;
}
}