Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- baseWidth = 1024 //базовое разрешение, от которого отталкиваемся
- baseHeight = 768
- width = window.screen.width //разрешение экрана пользователя
- height = window.screen.height
- img = document.getElementsByClassName('slider-home-map')[0]; //Получаем элемент изображения из DOM документа
- img.style.left += baseWidth - width; //к базовому смещению прибавляем разницу
- img.style.top += baseHeight - height;
Add Comment
Please, Sign In to add comment