css 垂直居中 绝对定位1234position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%); flex1234display: flex;align-items: center;justify-content: center;flex-direction: column; Newer 元素滚动时禁止父元素滚动 Older 原型与继承