Skip to content

CSS: Wildcard CSS Selectors Tricks

below example CSS wildcard selector

tag[class^=”begins-with”] { }
example, applied to tag with class :
<div class=”begin-with-sdhjshdj”></div>

 

tag[class$=”end-with”] { }
example, applied to tag with class :
<div class=”sdhjshdj-end-with”></div>

 

tag[class*=”contains”] { }
example, applied to tag with class :
<div class=”sdhjshdj-contains-with”></div>

Share

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.