[Vuejs]-How to render Vue Components over Html5-canvas

0👍

You can style any element using CSS with position: absolute to overlay the element on top of the canvas.

.container {
  position: relative;
  width: 300px;
  height: 300px;
}

.canvas {
  width: 300px;
  height: 300px;
  background-color: yellow;
}

.overlay {
  position: absolute;
  left: 20px;
  top: 20px;
  width: 100px;
  height: 100px;
  background-color: orange;
}
<div class="container">
  <canvas class="canvas"></canvas>
  <div class="overlay">
    This is displayed on top of the canvas
  </div>
</div>

Leave a comment