我只想将文字放在页面顶部的灰色框中。最后的结果是文本看起来像突出显示。
delete_post_meta

box1 {
background-color: lightgrey;
width: auto;
padding: 15px;
margin: 25px;
}

不确定我错过了什么。
答案 0 :(得分:3)
我在网络检查员中检查了您的代码。只需将box1更改为class而不是标记。然后将文本包装在
中
.box1 {
background-color: lightgrey;
width: auto;
padding: 15px;
margin: 25px;
}
<p class="box1"><strong>Note:</strong> Some of these resources are free, and some aren’t. Those that are paid resources are affiliate products or services, meaning if you buy them, I get a commission at no extra cost to you. Please know that I have personal experience
with all of the following resources, which is why I recommend them.</p>