📜  在html代码示例中填充文本后面的颜色

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

代码示例2
Option 1
display: table;

no parent required
h1 {
    display: table; /* keep the background color wrapped tight */
    margin: 0px auto 0px auto; /* keep the table centered */
    padding:5px;font-size:20px;background-color:green;color:#ffffff;
}

The Last Will and Testament of Eric Jones