h2::after {
content: "TOP";
background-color: #ffe70e;
font-size: 16px;
font-weight: bold;
display: inline-block;
padding: 5px 10px;
position: absolute;
right: -25px;
top: -10px;
}
作用:在h2标题元素末尾添加内容为TOP的相对h2绝对定位在右上角且更往外一些的标签。
h2::after {
content: "TOP";
background-color: #ffe70e;
font-size: 16px;
font-weight: bold;
display: inline-block;
padding: 5px 10px;
position: absolute;
right: -25px;
top: -10px;
}
作用:在h2标题元素末尾添加内容为TOP的相对h2绝对定位在右上角且更往外一些的标签。