I'm trying to do something similar with this example by using the "checked" hack
input[type=checkbox]:checked ~ label .box {
opacity:0;
-webkit-transform :scale(0) rotate(-180deg);
-moz-transform :scale(0) rotate(-180deg);
transform :scale(0) rotate(-180deg);
}
http://codepen.io/anon/pen/KVWWjy
However, I need to change the html code so that the label tag is before the input tag. When I move the input in the bottom the effects stop working. how can I fix this?