<div class="half">
<canvas width="100" height="100"></canvas>
<div>
left
</div>
</div>
<div>
right
</div>
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.half {
float: left;
background: gray;
height: 50%;
position: relative;
}
.half > canvas {
height: 100%;
z-index: -1;
opacity: 0;
}
.half > div {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.