<style>
/* 弹窗 */
.modal {
display: none; /* 默认隐藏 */
position: fixed;
z-index: 1;
padding-top: 100px;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0,0,0,0.4);
}
.modal-body {
position: relative;
background-color: #fefefe;
margin: auto;
padding: 0;
border: 1px solid #888;
width: 80%;
border-radius: 10px;
padding: 15px 10px;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
-webkit-animation-name: animatetop;
-webkit-animation-duration: 0.4s;
animation-name: animatetop;
animation-duration: 0.4s
}
/* 添加动画 */
@-webkit-keyframes animatetop {
from {top:-300px; opacity:0}
to {top:0; opacity:1}
}
@keyframes animatetop {
from {top:-300px; opacity:0}
to {top:0; opacity:1}
}
/**************************/
.select_number{
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.select_number .item{
border: 1px solid #eee;
border-radius: 5px;
margin-bottom: 10px;
padding: 5px 10px;
}
.select_number .active{
background-color: #0e90d2;
color: #fff;
}
.modal-body .buttons{
display: flex;
justify-content: space-around;
}
.modal-body .buttons button{
border:none;
background-color: #0f9ae0;
color: #fff;
padding: 8px 45px;
border-radius: 20px;
}
</style>
<div class="modal">
<div class="modal-body">
<div class="select_number"> </div>
<div class="buttons">
<button class="change-number">换号</button>
<button id="confirm">确认</button>
</div>
</div>
</div>
html css 弹窗效果展示
最新推荐文章于 2024-04-30 09:57:08 发布