当前位置:首页 > html5+css3 > 正文内容

弹出框在页面左右上下居中的写法

tigon4年前 (2021-02-19)html5+css31802

自适应写法

.dialog{
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

版权声明:本文由Web学习之路发布,如需转载请注明出处。

本文链接:https://www.webge.net/?id=109

“弹出框在页面左右上下居中的写法” 的相关文章

实现背景色半透明渐变效果

实现背景色半透明渐变效果

父级相对定位 .box__shadow_left,.box__shadow_right{ position: absolute; top:0; height: 65rpx; width: 60px; z-index: 9; } 左边的效果 .box_...