我有一个插件,它会在最后自动创建具有不同编号的类名。
.huge_it_slideshow_description_text_1
.huge_it_slideshow_description_text_2
.huge_it_slideshow_description_text_7
等...
我需要对它们进行设置,所以我添加了这个css:
.huge_it_slideshow_description_text_ {
styling here...
}
我正在使用的语法是正确的吗?
答案 0 :(得分:5)
[class^="huge_it_slideshow_description_text_"] {
styling here...
}
[class^="huge_it_slideshow_description_text_"] {
background: green;
}
<div class="huge_it_slideshow_description_text_1">text</div>
<div class="normal-class">text</div>
<div class="huge_it_slideshow_description_text_2">text</div>
<div class="huge_it_slideshow_description_text_3">text</div>