當(dāng)前位置:首頁 > IT技術(shù) > Web編程 > 正文

CSS3實(shí)現(xiàn)登錄窗口水平垂直居中顯示
2021-10-22 16:59:32

<!DOCTYPE html>
<html>
<head>
<style>
.flex-container {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: DodgerBlue;
    left: 0px;
    top: 0px;
    right: 0px;
    bottom: 0px;
}

#login {
  background-color: #f1f1f1;
  width: 400px;
  height: 280px;
}
</style>
</head>
<body>
<div class="flex-container">
  <div id="login"></div>
</div>

</body>
</html>

?

本文摘自 :https://www.cnblogs.com/

開通會(huì)員,享受整站包年服務(wù)立即開通 >