Source code
Revision control
Copy as Markdown
Other Tools
<!doctype html>
<style>
.foo > div::before {
display: block;
width: 100px;
height: 100px;
background: green;
content: "";
}
</style>
<div class="foo">
<div>
</div>
</div>
<script>
onload = function() {
document.querySelector('.foo').className = 'foo bar';
}
</script>