这很有效,但不幸的是它在全局范围内应用。我想将CSS应用于特定的页面ID(75)。如果我通过块编辑器中的“高级”选项卡添加了一个类,它将中断,没有列表图标。
.entry-content ul > li::before {
content: '\f0da';
color: #a86500;
font-family: 'Font Awesome 5 Free';
padding: 0 10px 0 0;
}
有任何想法吗?
最佳答案
您无需添加类。您应该能够定位已经是body
标记中的类的页面ID。检查DevTools中的页面,您应该在page-id-??
标记的类中看到唯一的body
,然后像这样定位:
.page-id-75 .entry-content ul > li::before {
content: "\f0da";
color: #a86500;
font-family: "Font Awesome 5 Free";
padding: 0 10px 0 0;