SHARE
TWEET

Untitled

a guest Aug 23rd, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var pageSettings = {
  2.   red: 200,
  3.   green: 200,
  4.   blue: 200,
  5.   background : ['https://pictures.s3.yandex.net/background.jpg',
  6.                'https://pictures.s3.yandex.net/cover-color.jpg',
  7.                 'https://pictures.s3.yandex.net/cover-grid.jpg',
  8.                 'https://pictures.s3.yandex.net/cover-typo.jpg',
  9.                  'https://pictures.s3.yandex.net/cover-wall.jpg'
  10.                ]
  11. };
  12.  
  13. var bgColor = 'rgb(' + pageSettings.red + ', ' + pageSettings.green + ', ' + pageSettings.blue + ')';
  14. document.body.style.backgroundColor = bgColor;
  15.  
  16. var header = document.getElementById('main-header');
  17. header.style.backgroundImage = 'url(' + pageSettings.background[2] + ')';
  18. console.log(header);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top