(26.07.2024, 10:21)admin Wrote: This won't work because the actual clickable element is not the icon itself but a div containing the icon. So the clip path must be applied to the div element.
ok thanks,
i can appy the following css with additional class to each icon which effectivly clips the negative of the image:
Code:
.svg1 { /* Set the region to be clipped ( negative of the image ) */
clip-path: polygon(
0% 0%,
100% 0%,
100% 100%
);
}
is it possible to use javascript to apply the css to all icons with the same image src filename? if so would you have an example or another way that avoids manually applying 1 by 1?