📜  引导中心 div 垂直和水平 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:12.050000             🧑  作者: Mango

代码示例5
.container{    
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
      width: /* Define the width here; */
    height: /* Define the height here; */
}

/*You have to define the width and height! */