var gl = document.querySelector("#l1").getContext("webgl");
gl.enable(gl.SCISSOR_TEST);
gl.scissor(100, 50, 100, 90);
gl.clearColor(0, 0.25, 0, 0.25);
gl.clear(gl.COLOR_BUFFER_BIT);
var ctx = document.querySelector("#l3").getContext("2d");
ctx.fillStyle = "rgba(255,0,255,0.25)";
ctx.font = "55px san-serif";
ctx.textAlign = "center";
ctx.fillText("layer 3", 150, 50);
#l0, #l1, #l2, #l3, #l4 {
position: absolute;
left: 0;
top: 0;
width: 300px;
height: 150px;
border: 1px solid black;
text-align: center;
font-weight: bold;
}
#l0 {
color: rgba(255,0,0,0.25);
font-size: 70px;
}
#l2 {
color: rgba(0,255,0,0.25);
font-size: 60px;
}
#l4 {
color: rgba(0,0,255,0.25);
font-size: 50px;
}
<div id="l0">layer 0</div>
<canvas id="l1"></canvas>
<div id="l2">layer 2</div>
<canvas id="l3"></canvas>
<div id="l4">layer 4</div>