CSS样式所有以string开头的类

Sat*_*000 -2 css

我有一个插件,它会在最后自动创建具有不同数字的类名.

.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)

我正在使用的语法是正确的吗?

Amm*_*CSE 5

使用属性以选择器开头

[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)