标签:blog http ar 2014 div 代码 html log new
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="Script/raphael.js"></script> </head> <body> <div id="paper"> </div> <script> //创建一个画布 var paper = new Raphael("paper", 500, 500); //画圆 paper.circle(50, 50, 50); //画圆角方形 paper.rect(90, 90, 50, 50, 10); </script> </body> </html>
简要说明:
new Raphael("paper", 500, 500);第一个参数是需要将画布添加到哪个容器里面,500,500分别是宽和高
circle(50, 50, 50)参数分别是,x,y,r直径
代码地址:https://coding.net/tommy-zhang/raphaeljs.git
效果图如下
标签:blog http ar 2014 div 代码 html log new
原文地址:http://blog.csdn.net/zhangyuanwei88/article/details/38821485