This div element has a heart-shaped mask.This div element has a heart-shaped mask.This div element has a heart-shaped mask.This div element has a heart-shaped mask.This div element has a heart-shaped mask.This div element has a heart-shaped mask.This div element has a heart- shaped mask.This div element has a heart-shaped mask.
This div element has a heart-shaped mask.This div element has a heart-shaped mask.This div element has a heart-shaped mask.This div element has a heart-shaped mask.This div element has a heart-shaped mask.This div element has a heart-shaped mask.This div element has a heart- shaped mask.This div element has a heart-shaped mask.
.item {
clip-path: circle(100px, 100px, 100px);
clip-path: circle(100px at center);
}
Syntax for circle was chnaged, to radial gradient syntax
<clipPath id="clipping">
<polygon points="98.4999978 153.75..."/>
</clipPath>
.item {
clip-path: url(#clipping);
}
<clipPath id="clipping">
<polygon points="98.4999978 153.75..."/>
</clipPath>
.item {
clip-path: url(#clipping);
}
<clipPath id="clipping">
<polygon points="98.4999978 153.75..."/>
<text x="0" y="3.2em">Text
</clipPath>
.item {
clip-path: url(#clipping);
}
.item {
mask-image: url(YOUR.png),
linear-gradient(-45deg,
rgba(0,0,0,1) 20%, rgba(0,0,0,0) 50%);
mask-repeat: space;
}
Mask image: PNG
<mask id="masking" maskUnits="objectBoundingBox"
maskContentUnits="objectBoundingBox">
<rect y="0" width="1" height="1" fill="url(#gradient)" />
<circle cx=".5" cy=".5" r=".4" fill="gray" />
<circle cx=".5" cy=".5" r=".3" fill="white" />
...
</mask>
.item {
mask: url(#masking);
}
<mask id="masking" maskUnits="objectBoundingBox"
maskContentUnits="objectBoundingBox">
<rect y="0" width="1" height="1" fill="url(#gradient)" />
<circle cx=".5" cy=".5" r=".4" fill="gray" />
<circle cx=".5" cy=".5" r=".3" fill="white" />
...
</mask>
.item {
mask: url(#masking);
}
.item {
background: url(YOUR IMAGE) no-repeat;
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
}
<pattern id="pattern" patternUnits="userSpaceOnUse"
width="200" height="300" viewbox="0 0 200 300">
<image xlink:href="YOUR IMAGE" width="200" height="300" />
</pattern>
text {
fill: url(#pattern);
}
-webkit-background-clip: text;
and has much better support.