标签:pre color lte contex red class div 样式 填充
<canvas style="border: aqua solid 1px;" id=‘canvas‘ width=‘500‘ height=‘500‘></canvas> <script> var canvas = document.getElementById(‘canvas‘); context = canvas.getContext(‘2d‘); context.font = ‘38pt Arial‘; //字体样式 context.fillStyle = ‘red‘; //填充线样式 context.strokeStyle=‘blue‘; //轮廓线样式 context.fillText("hellocav",100,100); //填充线 context.strokeText("hellocav",100,100); //轮廓线 </script>
标签:pre color lte contex red class div 样式 填充
原文地址:https://www.cnblogs.com/tongyuzhe/p/10421150.html