window1 addEventListener, Window.innerWidth 활용(JavaScript) DOCTYPE html> Document Hello JavaScript!! const title = document.querySelector("body");const colors = ["#1abc9c", "#3498db", "#9b59b6", "#f39c12", "#e74c3c", "#C18282", "#FF50CF","#0A9696"];const RESIZE_CLASS = title.style.backgroundColor = colors[0]; function handleResize() { var wframe = window.innerWidth console.log(wframe); if(wframe200 &&wframe 400 &&wframe 600 &&wframe 800 &&wframe 1000 &&.. 2020. 8. 6. 이전 1 다음