Learn More About CSS Pseudo Selectors by Building A Balance Sheet - Step 30

does span[class~=“sr-only”] same as .sr-only?

.sr-only will match any element with the class sr-only.

span[class~=“sr-only”] will only match a span element that has a class of sr-only. So it is a little more restrictive than .sr-only.

2 Likes

ok now i understand thanks

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.