我有两个 wordpress 帖子,我想给它们相同的 CSS 类,在我的样式表中我说:
.postid-861 .postid-862 #masthead .site-title a.logo-image img {
display: none;
}
这是行不通的。我想念什么吗?如果我说:
.postid-861 #masthead .site-title a.logo-image img {
display: none;
}
它只适用于一个帖子。 请指教
最佳答案
您可以使用 ,
为不同的类赋予相同的属性,如下所示使用该代码:
.postid-861 #masthead .site-title a.logo-image img , .postid-862 #masthead .site-title a.logo-image img {
display: none;
}
假设我有类 image
和 title
并且我希望两者都有红色背景:
.image , .title {
background-color:#a30;
}
关于php - 两个 wordpress 帖子的特定类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33583466/