F
F
frontender2015-10-24 12:22:29
css
frontender, 2015-10-24 12:22:29

Why is svg not stretching in IE?

Hey!
The crux of the matter: I have an svg image that I insert as a background into a div. And I expose this background background-size: cover;

.element {
  background: url("../img/svg/purple.svg") center 50px no-repeat;
  background-size: cover;
}

In Chrome, Firefox and Opera it stretches to the full width of the screen, but not in IE. What could be the problem?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
Faber Estello, 2015-10-24
@senselessV7

alternatively, support
caniuse.com/#search=background-size
caniuse.com/#search=svg
can be tried as a percentagebackground-size: 100% 100%;

I
Ivanq, 2015-10-24
@Ivanq

IE doesn't support background-size: cover / contain

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question