no effect
小隋
小隋 2022-03-26 21:39:04
0
2
2516

<!DOCTYPE html><html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> canvas { border: 1px dashed gray; } </style> <script type="text/javascript"> window.onload = function() { // Get the canvas object var oCanvas = document.getElementById("canvas") ; if (oCanvas.getContext) { // Get the 2d drawing context var oContext = oCanvas.getContext("2d"); var oImageData = oContext.createImageData(100, 100); var data = oImageData.data; for (var i = 0; i < data.length; i = 4) { // Red data[i 0] = 255; // Green data[i 1] = 0; // Blue data[i 2] = 0; / / Transparency data[i 3] = 100; } oContext.putImageData(oImageData, 10, 10); } } </script> </head> <body> <canvas id="canvas" height="600 " width="600"></canvas> </body></html>

小隋
小隋

reply all(1)
P粉098578572

Why is it ineffective? I wrote it according to the course

  • reply The punctuation marks are wrong in Chinese and English
    小隋 author 2022-03-27 13:14:48
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template