modalframe
Version:
基于vue的自定义模态框组件!
131 lines (115 loc) • 2.7 kB
CSS
.bounceModalFrame-enter-active {
animation: bounce-in 0.2s
}
.bounceModalFrame-leave-active {
animation: bounce-out .2s
}
@keyframes bounce-in {
0% {
transform: scale(0);
}
100% {
transform: scale(1);
}
}
@keyframes bounce-out {
0% {
transform: scale(1);
}
100% {
transform: scale(0);
}
}
.modalFrame {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 9999;
background-color: rgba(0, 0, 0, .3);
}
.modalFrame .modalFrameBox {
position: absolute;
background-color: #fff;
box-shadow: 1px 1px 50px rgba(0, 0, 0, .3);
border-radius: 2px;
}
/*modalFrameTitle*/
.modalFrame .modalFrameBox .modalFrameTitle {
padding: 0 10px 0 20px;
width: 100%;
height: 34px;
line-height: 34px;
border-radius: 4px 4px 0 0;
border-bottom: 1px solid #eee;
font-size: 14px;
color: #333;
overflow: hidden;
background-color: #F8F8F8;
cursor: move;
}
.modalFrame .modalFrameBox .modalFrameTitle .icon {
display: inline-block;
float: right;
margin-top: 8px;
cursor: pointer;
width: 20px;
height: 20px;
line-height: 20px;
}
.modalFrame .modalFrameBox .modalFrameTitle .icon:hover {
opacity: 0.7;
}
.modalFrame .modalFrameBox .modalFrameTitle .icon .icon-close {
font-size: 20px;
}
/*frameBox*/
.modalFrame .modalFrameBox .frameBox {
position: absolute;
left: 0;
right: 0;
top: 34px;
bottom: 38px;
}
/*frameBtn*/
.modalFrame .modalFrameBox .frameBtn {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 38px;
border-radius: 0 0 4px 4px;
background-color: #F8f8f8;
border-top: 1px solid #eee;
}
.modalFrame .modalFrameBox .frameBtn .btn-cancel {
float: right;
margin: 5px 10px 0 0;
width: 56px;
height: 28px;
border: 1px solid #dedede;
background-color: #f1f1f1;
color: #333;
border-radius: 2px;
font-weight: 400;
cursor: pointer;
}
.modalFrame .modalFrameBox .frameBtn .btn-ok:hover, .modalFrame .modalFrameBox .frameBtn .btn-cancel:hover {
opacity: .9;
}
.modalFrame .modalFrameBox .frameBtn .btn-ok:focus, .modalFrame .modalFrameBox .frameBtn .btn-cancel:focus {
outline: none;
}
.modalFrame .modalFrameBox .frameBtn .btn-ok {
float: right;
margin: 5px 10px 0 0;
width: 56px;
height: 28px;
border: 1px solid #4898d5;
background-color: #2e8ded;
color: #fff;
border-radius: 2px;
font-weight: 400;
cursor: pointer;
}