CSS Remove after if element has two classes -
say have next css :after
<div class="bob"></div> .bob:after{ background:#ff0000; height:10px; width:10px; } is possible remove after using sec class?
<div class="bob geff"></div> .bob:after{ background:#ff0000; height:10px; width:10px; } .bob.geff:after{ background:none; height:0px; width:0px; }
your :after won't have effect unless assign content. default value content none,
.bob:after{ content:''; background:#ff0000; display: inline-block; height:10px; width:10px; } .bob.geff:after{ content: none; } should work. fiddle
css
No comments:
Post a Comment