/*Changing the color the red when it starts*/ body{ background-color: red; } /*Changing the color to blue when you focus on the window*/ body:focus{ background-color: blue; }
<style> .dabutton:focus { background-color:yellow; } </style> <button class="dabutton"></button> // <-- usage