HTML5 Game - Create Overlapped canvas

Description

Create Overlapped canvas

Demo

ResultView the demo in separate window

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Canvas overlap example</title>
<style>
body {/*w  w w  .  j  av  a 2 s.co  m*/
  background-color: #666;
}
#canvas1 {
  background-color: #0f0;
  position:fixed;
  top:50px;
  left:50px;
}
#canvas2 {
  background-color: #f00;
  position:fixed;
  top:250px;
  left:250px;
}
</style>
</head>
<body>
<canvas id="canvas1" width="250" height="300"></canvas>
<canvas id="canvas2" width="200" height="150"></canvas>
</body>
</html>

Related Topic