Heim  >  Artikel  >  Web-Frontend  >  这回的html5代码怎么就不好使了呢,菜鸟求助啊_html/css_WEB-ITnose

这回的html5代码怎么就不好使了呢,菜鸟求助啊_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:14:12876Durchsuche

nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



无标题文档





<script> <br /> function createRetcs(context) <br /> { <br /> <br /> context.beginPath(); <br /> context.fillStyle="rgb(200,0,0)"; <br /> context.fillRect(10,10,100,100); <br /> context.fillStyle="rgb(0,200,0)"; <br /> context.fillRect(20,20,100,100); <br /> context.fillStyle="rgb(0,0,200)"; <br /> context.fillRect(30,30,100,100); <br /> context.closePath(); <br /> } <br /> function drawRects() <br /> { <br /> var canvas=document.getElementById('myCanvas'); <br /> var contex=canvas.getContext('2d'); <br /> context.save(); <br /> context.translate(130,200); <br /> context.lineWidth=4; <br /> context.lineJoin='round'; <br /> createRetcs(context); <br /> context.stroke(); <br /> context.restore(); <br /> } <br /> </script>



回复讨论(解决方案)

canvas我还没开始研究……

用火狐8.0.1测画出来了个框,查查语句。

用火狐8.0.1测画出来了个框,查查语句。
没明白才问哒

嗯  同样的问题

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn