diff --git a/DOM_projects/color_picker.js b/DOM_projects/color_picker.js index 29b639e..e4c14ef 100644 --- a/DOM_projects/color_picker.js +++ b/DOM_projects/color_picker.js @@ -7,4 +7,9 @@ buttons.forEach((button) => { button.style.height = "150px"; button.style.width = "150px"; }); + button.addEventListener('mouseout',(e) => { + body.style.backgroundColor = e.target.id; + button.style.height = "100px"; + button.style.width = "100px"; + }); }); \ No newline at end of file