CSS样式 - 在类中编辑H2(CSS Styles - Editing H2 within classes)
我希望在另一个类块中编辑H2类的内容,但却努力使其工作。
这是班级列表
Live Now - Podcasts
我正在尝试编辑H2的内容,其中包含“Live Now - Podcasts”,但没有运气
我尝试了很多无用的东西,我尝试的最后一件事就是
#mainHeader li#xyz_insert_html_widget-2.widget-1.widget-first.widget-last.widget-odd.widget.widget_xyz_insert_html_widget h2.box
使用内容属性content: "TEXT HERE";
任何指导我正确方向的帮助表示赞赏!
I'm looking to edit the content of a H2 class within another block of classes but struggling to make it work.
Here is the class list
Live Now - Podcasts
I'm trying to edit the content of the H2 which contains "Live Now - Podcasts" with no luck
I've tried a lot of things with no avail, the last thing I tried was
#mainHeader li#xyz_insert_html_widget-2.widget-1.widget-first.widget-last.widget-odd.widget.widget_xyz_insert_html_widget h2.box
Using the content property content: "TEXT HERE";
Any help in pointing me in the right direction is appreciated!
原文:https://stackoverflow.com/questions/37668541
更新时间:2020-09-08 11:09
最满意答案
尝试
.box{
content: "TEXT HERE";
}
这是因为使用css,您可以引用您希望应用属性的特定元素类名称,除非您在文档的其他区域中具有这些名称。 在这种情况下,要么为它分配一个id,以便像这样引用它:
#exampleid{
content: "TEXT HERE";
}
或遵循您的界限,具体情况:
header > li > .box {
content: "TEXT HERE";
}
Try
.box{
content: "TEXT HERE";
}
This because with css you can just reference the specific element class name that you want your properties to apply unless you have those on other area of your documents. In that case either assign an id to it so to reference it like this:
#exampleid{
content: "TEXT HERE";
}
or following your line, being case specific:
header > li > .box {
content: "TEXT HERE";
}
相关问答
在你的第二个小提琴中,你的.cont_title类上面有一组无效的字符。 删除无效字符可以解决您遇到的问题。 ...
.row:hover .remove{
opacity: 1;
}​ &t;-- Some weird characters here
.cont_title {
height: 40px;
...
In your second fiddle, you have an invalid set of characters just above yo
...
检查你的seetings.py , STATIC_URL似乎被定义错了。 查看文档: https : //docs.djangoproject.com/en/dev/ref/settings/#std : setting-STATIC_URL New to style sheets. I forgot to include following style sheet entries in base.html then it worked. Although the file date picker
...
尝试 .box{
content: "TEXT HERE";
}
这是因为使用css,您可以引用您希望应用属性的特定元素类名称,除非您在文档的其他区域中具有这些名称。 在这种情况下,要么为它分配一个id,以便像这样引用它: #exampleid{
content: "TEXT HERE";
}
或遵循您的界限,具体情况: header > li > .box {
content: "TEXT HERE";
}
Try .box{
content: "TEXT HE
...
正如你所说的那样if .$item['itemImageTitle'] & .$item['itemTitle'] empty show just the image 。 你可以试试这个