1

I have defined background size of an image inside a div element to 150%

#div-backgound {
    background-image: url('img.jpg');
    background-position: center 0px;
    background-size: 150% 150%;
    height: 120px;
    width: 120px;
}

I can not retrieve values from:

document.getElementById("div-background").style.backgroundSize;

How do I retrieve the value 150% from background-size properties in javascript?

zony
  • 19
  • 4

0 Answers0