xiefei
xiefei

Reputation: 6599

how to change clipPath on an image

Is there a way to change the clip-path attribute of an image to another clipPath element?

seems setAttribute('clip-path', newClipPath) doesn't work.

Upvotes: 0

Views: 3233

Answers (1)

Rajkamal Subramanian
Rajkamal Subramanian

Reputation: 6944

Please have a look at here http://jsfiddle.net/GhRnn/2/ The Google logo is clipped using different clip paths, defined in def section. Click on the buttons, to see it in action.

Upvotes: 1

Related Questions