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

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

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

自适应写法

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

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

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

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

ease,seae-in,ease-in-out,ease-out,效果

ease,seae-in,ease-in-out,ease-out,效果

值描述linear规定以相同速度开始至结束的过渡效果(等于 cubic-bezier(0,0,1,1))。(匀速)ease规定慢速开始,然后变快,然后慢速结束的过渡效果(cubic-bezier(0.25,0.1,0.25,1))(相对于匀速,中间快,两头慢)。ease-in规定以慢速开始的过渡效果...

less

继承:2种 box1想公用box2的内容1,完全复制  .box1{    .box2}2,只公用同级的.box1{    &:extend(.box2)}嵌套.box1{ &nbs...

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

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

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