>  기사  >  웹 프론트엔드  >  这回的html5代码怎么就不好使了呢,菜鸟求助啊_html/css_WEB-ITnose

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

WBOY
WBOY원래의
2016-06-24 12:14:12872검색

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测画出来了个框,查查语句。
没明白才问哒

嗯  同样的问题

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.