我有一个插件,它会在最后自动创建具有不同数字的类名.
.huge_it_slideshow_description_text_1
.huge_it_slideshow_description_text_2
.huge_it_slideshow_description_text_7
Run Code Online (Sandbox Code Playgroud)
等等...
我需要设置它们的样式,所以我添加了这个css:
.huge_it_slideshow_description_text_ {
styling here...
}
Run Code Online (Sandbox Code Playgroud)
我正在使用的语法是正确的吗?
[class^="huge_it_slideshow_description_text_"] {
styling here...
}
Run Code Online (Sandbox Code Playgroud)
[class^="huge_it_slideshow_description_text_"] {
background: green;
}
Run Code Online (Sandbox Code Playgroud)
<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>
Run Code Online (Sandbox Code Playgroud)