[improvement] Popup: add position default value

This commit is contained in:
陈嘉涵
2019-05-05 17:24:32 +08:00
parent 0288fb35a4
commit 70550a500f
7 changed files with 33 additions and 45 deletions
+6 -11
View File
@@ -7,20 +7,21 @@
&-popup {
position: fixed;
top: 50%;
left: 50%;
max-height: 100%;
overflow-y: auto;
background-color: @white;
transition: .3s ease-out;
-webkit-overflow-scrolling: touch;
transform: translate3d(-50%, -50%, 0);
&--center {
top: 50%;
left: 50%;
transform: translate3d(-50%, -50%, 0);
}
&--top {
width: 100%;
top: 0;
right: auto;
bottom: auto;
left: 50%;
transform: translate3d(-50%, 0, 0);
}
@@ -28,24 +29,18 @@
&--right {
top: 50%;
right: 0;
bottom: auto;
left: auto;
transform: translate3d(0, -50%, 0);
}
&--bottom {
width: 100%;
top: auto;
bottom: 0;
right: auto;
left: 50%;
transform: translate3d(-50%, 0, 0);
}
&--left {
top: 50%;
right: auto;
bottom: auto;
left: 0;
transform: translate3d(0, -50%, 0);
}