Tuesday, June 26, 2018

html5 - How can I change the content of a div using check boxes

I am trying to have a checkbox change the content of a div but if the content isn't together (in the same div), then it will not work.



HTML:












CSS:



.check:before {
display: block;

width: 100px;
height: 100px;
background: red;
content:'';
}

input:checked ~ .check:before {
content:'Content';
}



JSFiddle: https://jsfiddle.net/pgkwn4j6/

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...