我最困难的时间是让画布在视频的顶部呈现。我猜测materializeCSS正在覆盖某些CSS,这与我的位置和大小CSS更改无关。
这是相关的HTML
<div class="row demo-frame">
<div class="col s12 demo-container">
<canvas id="canvas" class="left" width="600" height="450"></canvas>
<video id="video" class="left" width="600" height="450" autoplay muted></video>
</div>
</div>
和(相关的)JS:
var video = document.getElementById('video');
canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');