Answer the question
In order to leave comments, you need to log in
IE11 and Edge do not load the background image in a style if it is not used immediately after loading, how to fix it?
Colleagues,
faced such problem in Edge and IE11.
Let's say there is a button (simplified):
<div class='button loading'>
</div>
.loading {
background-image: url ('loading.gif');
}
<div class='button ready'>
</div>
.ready {
background-image: url ('ready.svg');
}
<img src="ready.svg" style="display:none;" />
Answer the question
In order to leave comments, you need to log in
I faced. This is normal behavior for browsers - the rest just load with a delay - this is also not sugar. Valni url before and after. When changing the state, change not the image, but the opacity of the pseudo-elements, for example. Or transform + transition + overflow: hidden. Any effect, but leave the url outside the state class
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question