I have a fixed image within a div that has an overflow and border radius applied.
When testing in Chrome, grid lines bleed outside the circle, also revealing the image. I'm only seeing this behaviour in Chrome, and I've been unable to find a solution. Is there a workaround?
Code:
.parallax-container {
position: relative;
overflow: hidden;
height: 500px;
width: 500px;
top: 300px;
}
.parallax {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
border-radius: 50%;
overflow: hidden;
}
.parallax img {
display: block;
position: fixed;
left: 0%;
bottom: 0;
min-width: 100%;
min-height: 100%;
-webkit-transform: translate3d(-50%, -200px, 0px);
transform: translate3d(-50%, -200px, 0px);
}
.parent{
height: 3000px;
}
<div class="parent">
<div class="parallax-container">
<div class="parallax">
<img src="https://unsplash.it/200/300/?random" />
</div>
</div>
</div>
Fiddle:
https://jsfiddle.net/y9ge48Lo/
Screenshot: