After adding absolute, the text-align, width, and so on of the row-level element span will take effect. Why?

such as title:

after position:absolute is added, the text-align, width, and height of the row-level element span take effect. Why?

Code:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    body {
      margin: 0;
    }
    .box {
      margin: 15% auto;
      width: 200px;
      height: 200px;
      box-sizing: border-box;
      border: 1px solid darkblue;
    }
    .text {
      /* position display: block; */
      position: absolute;
      width: 200px;
      height: 200px;
      text-align: center;
      line-height: 200px;
    }
  </style>
</head>
<body>
  <div class="box">
    <span class="text">letter</span>
  </div>
</body>
</html>
Apr.04,2021
After

position:absolute, span is display:block;


plus position:absolute , the element is treated as a block element

by default.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e62cc5-459f7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e62cc5-459f7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?