Force IE to redraw pseudo-elements
If you have something like this:
div:after {
content: '';
position: absolute;
top: 0;
height: 0;
width: 15px;
height: 15px;
background-color: gray;
}
div.active:after {
background-color: orange;
}
And you want to change the state of this div with JavasScript adding active class, you must to know that IE doesnt redraw pseudo-elements if their content dont change, then remember to change the content when state changes:
div.active:after {
content: ' ';
background-color: orange;
}
Written by Carlos Sanz García
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#