Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/canvas/element/manual/draw-element-image/canvas-content-drawable-stacking-context.tentative.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<title>HTML-in-Canvas: A canvas with content=drawable is a stacking context</title>
<link rel="match" href="canvas-content-drawable-stacking-context.tentative-ref.html">
<style>
div {
position: relative;
width: 100px;
height: 100px;
background: red;
}
canvas {
display: block;
margin-top: -100px;
background: green;
}
</style>
<p>Test passes if there is a green square and no red.</p>
<div></div>
<canvas width="100" height="100" content="drawable"></canvas>
</html>