如何更改棘轮模态,使其从顶部向下滑动并且只占据屏幕的 50% 而不是整个高度?
模态的CSS是;
.modal {
position: fixed;
top: 0;
z-index: 11;
width: 100%;
min-height: 100%;
overflow: hidden;
background-color: #fff;
opacity: 0;
-webkit-transition: -webkit-transform .25s, opacity 1ms .25s;
-moz-transition: -moz-transform .25s, opacity 1ms .25s;
transition: transform .25s, opacity 1ms .25s;
-webkit-transform: translate3d(0, 100%, 0);
-ms-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}
.modal.active {
height: 100%;
opacity: 1;
-webkit-transition: -webkit-transform .25s;
-moz-transition: -moz-transform .25s;
transition: transform .25s;
-webkit-transform: translate3d(25%, 0, 0);
-ms-transform: translate3d(25%, 0, 0);
transform: translate3d(25%, 0, 0);
}
我一直在玩不同的价值观,但无法得到我想要的。