From 97065b2e68dd8768dc1ea092c893c57ebe205026 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Thu, 25 Feb 2021 08:31:36 -0500 Subject: use class="hidden" not style="display:none" --- files/zh-cn/web/api/canvasrenderingcontext2d/drawimage/index.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'files/zh-cn/web/api/canvasrenderingcontext2d/drawimage') diff --git a/files/zh-cn/web/api/canvasrenderingcontext2d/drawimage/index.html b/files/zh-cn/web/api/canvasrenderingcontext2d/drawimage/index.html index b0d477e9e8..dc126e4ad4 100644 --- a/files/zh-cn/web/api/canvasrenderingcontext2d/drawimage/index.html +++ b/files/zh-cn/web/api/canvasrenderingcontext2d/drawimage/index.html @@ -66,7 +66,6 @@ void ctx.drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth,

HTML

<canvas id="canvas"></canvas>
-<div style="display:none;">
   <img id="source" src="https://mdn.mozillademos.org/files/5397/rhino.jpg"
        width="300" height="227">
 </div>
@@ -87,7 +86,6 @@ ctx.drawImage(image, 33, 71, 104, 124, 21, 20, 87, 104);
 

HTML

<canvas id="canvas"></canvas>
-<div style="display:none;">
   <img id="source"
        src="https://mdn.mozillademos.org/files/5397/rhino.jpg"
        width="300" height="227">
@@ -109,11 +107,10 @@ image.addEventListener('load', e => {
 
 

结果

-
+