0
jQuery("div")
将创建一个jquery对象,其中包含div元素。 同样,我们如何在Raphael js中创建“clipPath
”元素。如何使用Raphael js创建svg元素?
Raphael定义了矩形,圆形的方法。有没有像RaphaelCreateElement("clipPath")
或RaphaelCreateElement("defs")
这样的方法会返回一个Raphael元素。所以我可以做paper.add(RaphaelCreateElement("clipPath"))
。
我看过这个How do I manipulate the SVG DOM and create elements?,但返回的元素是svg dom元素,它并不享受所有的Raphael方法。