alert弹框自定义样式修改

<div class="body">
     <div class="mask"></div>
     <div class="dialog size-dialog">模态框</div>
</div>
.mask{
    position: fixed;
    z-index: 9;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.5);
    top: 0;
    left: 0;
}


.size-dialog{
  width: 500px;
  height: 500px;
}

.dialog{
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 12;
    background: #fff;
}

阅读更多

没有更多推荐了,返回首页