Raphael初始化,path,circle,rect,ellipse,image
path jsp:
Title - 锐客网
path js:
$(function() { initRaphael(); }); function initRaphael(e) { // 这样会自动创建一个svg对象 var paper = Raphael(0,0,300,300); var d = 'M10,30L60,30L10,80L60,80'; var mark = paper.path(d); mark.attr({ "stroke":"#F00", "stroke-width":3 }); mark.attr("fill","#00c"); }
other jsp:
Title - 锐客网
other js:
$(function() { initRaphael(); }); function initRaphael(e) { // 这样会根据container这个ID找到该对象 var paper = Raphael('container',500,500); var dot = paper.circle(250,150,100); dot.attr({ fill:'red', stroke:'green', 'stroke-width':3 }); var d = paper.ellipse(100,100,50,20); var rec = paper.rect(100,10,50,20); // 图片会产生相应的缩放 var fluffy = paper.image('1.jpg',25,20,100,100); fluffy.attr('stroke','green'); fluffy.attr('stroke-width',3); var png = paper.image('a.png',200,200,80,65); }
【Raphael初始化,path,circle,rect,ellipse,image】
推荐阅读
- parallels|parallels desktop 解决网络初始化失败问题
- Python(pathlib模块)
- Realm
- 代码不规范容易造成的bug
- 古有商鞅变法,今有Pathways攻占头马
- C#|C# 文件路径操作
- mac升级之(xcrun:|mac升级之:xcrun: error: invalid active developer path, missing xcrun)
- Git上传至GitHub
- 《七天爬虫进阶系列》|《七天爬虫进阶系列》 - 02 数据解析之 XPath
- node.js-path模块你了解多少