I want to change the background color of the box once i check the checkbox, but it doesn't work with the code i wrote. am i missing something? thanks
.box{
  width: 100px;
  height: 100px;
  background-color: green;
  }
  input[type="checkbox"]:checked .box{
    background-color: red;
  }<input type="checkbox" name="" />
<div class="box"></div> 
    