I have included my codepen for an example. I need to have the image move around with cursor. Is there an attribute like object-position Y or something that i can use?
I know i could do background-position x or y , but why not object-position X or Y?
const images = document.querySelectorAll('.image');
images.forEach((image) => image.addEventListener('mousemove', (e) => {
image.style.objectPosition = -e.offsetX + "px"<--works but I want both directions??
//image.style.objectPositionX = -e.offsetX + "px"//why cant i do these?
//image.style.objectPositionY = -e.offsetY + "px"
}));