Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个图像作为拉斐尔的背景。
我想在任何给定时间只显示此图像的一部分。
我怎么做?
您可以使用 clip-rect 属性仅显示图像的选定区域,如下所示
var paper = Raphael(0, 0, 964, 641); var background = paper.image("image.jpg",0,0,964,641); background.attr({"clip-rect":"0,0,200,200"});
这是小提琴
</p>