Tuesday 26 June 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

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...