Hello, I need to get the value of obj.style.backgroundPosition . Is it possible at all?

Or how to get the css properties left and top of a div object absolutely positioned?

    2 answers 2

    window.getComputedStyle(document.querySelector('div#hai')).backgroundPosition

    proof

       document.getElementById("elementID").style.backgroundPosition 
      • Cap This does not return anything, but I need to return exactly the value of this property, preferably separately left and top ... although I already bent it)) - Diman