Problems with css selector

want to match elements containing "I -" in a class of class
class= "xxxx i-abc" match
class= "i-abc" match
class= "aaaai-abc" mismatch
how to write

Mar.14,2022

two in one

//i
[class^="i-"],
[class*=" i-"]{
  color: red;
}


I don't know if it will work. Try it


Pure css selector doesn't seem to work

[class^="i-"]{
  color: red;
}

does not match the first type

[class*="i-"]{
  color: red;
}

will match the third type

can only be filtered with js, but the requirement itself is strange

Menu