I have the following html and css: https://codepen.io/marceltudor/pen/xxJBqRO
It works well on android. Meaning that it shows the clipping part, and does not show all the picture. On Edge and Chrome with developper tools and simulating the iPhone XR it works well.
However on my real iPhone XR updated to the latest iOS 16.4.1 I see the following whole image thus without clippings.
When I minimize the Safari and open another app and then open again Safari I see the clippings. I need to see the clippings from the very beginning, not only after I switch to another app and back to Safari. I've added the -webkit-...
I copy here as well the code:
.clip-svg {
clip-path: url(#myClip);
-webkit-clip-path: url(#myClip);
animation: fadeInAnimation ease 3s;
-webkit-animation: fadeInAnimation ease 3s;
}
#image-overlay {
position: absolute;
}
#image {
opacity: 0.035;
-webkit-opacity: 0.035;
}
.container {
position: relative;
}
#overlay {
padding: 10px;
inset: 0;
position: absolute;
background-color: rgba(255, 255, 255, 0.4);
}
@keyframes fadeInAnimation {
0% {
opacity: 0;
-webkit-opacity: 0;
}
100% {
opacity: 1;
-webkit-opacity: 1;
}
}
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="overlay.css">
</head>
<body>
<div class="container">
<img id="image-overlay" class="clip-svg" src="https://miro.medium.com/v2/resize:fit:1400/0*kAOAT0_uC42E9V5l" />
<img src="https://miro.medium.com/v2/resize:fit:1400/0*kAOAT0_uC42E9V5l" id="image" />
</div>
<svg>
<defs>
<clipPath id="myClip" clipPathUnits="objectBoundingBox">
<polygon points="0,0 .4,0 .4,.4 0,.4"/>
<circle cx=".2" cy=".42" r=".04"/>
<circle cx=".4" cy=".2" r=".04"/>
<polygon points=".6,.6 1,.6 1,1 .6,1" />
<circle cx=".8" cy=".6" r=".04"/>
<circle cx=".6" cy=".8" r=".04"/>
<polygon points=".6,0 1,0 1,.4 .6,.4" />
<circle cx=".6" cy=".2" r=".04"/>
<circle cx=".8" cy=".4" r=".04"/>
<polygon points="0,.6 .4,.6 .4,1 0,1"/>
<circle cx=".2" cy=".6" r=".04"/>
<circle cx=".4" cy=".8" r=".04"/>
</clipPath>
</defs>
</svg>
</html>
The above code snippet is the same as on the code-pen link.