How many CSS selectors can be included?
P粉002572690
P粉002572690 2023-08-16 11:30:40
0
1
429

I've tried looking for an answer to this problem, but to no avail:

I am using css selector to locate all class names starting with col-1, col-2, col-3, col-[class*="col-"]. But I'm running into conflicts with some other third-party integration class names: col-md-11, col-lg-2, col-sm- 3... Thanks a lot, does anyone have any ideas to select only the class names: col-1, col-2, col-3, col-... The most concise way (maybe just one line of code ).

My HTML example:

I tried searching on the internet but couldn't find a solution.

P粉002572690
P粉002572690

reply all (1)
P粉416996828

It's a bit complicated, but you can combine your existing content with a:notselector;

[class*='col-']:not([class*='col-md'],[class*='col-lg'],[class*='col-sm']){ color: red; }
红色
红色
红色
非红色
红色
非红色
红色
非红色
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!