📜  中间文本 css - Html 代码示例

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

代码示例4
/* This is how to put something in the middle of the screen */
/* We are using an h1 element as an example */

h1 {
left: 0;
    line-height: 200px;
    margin-top: -100px;
    position: absolute;
    text-align: center;
    top: 50%;
    width: 100%;
}