I just won a "legacy" sitebuild project that I need to fix some issues on. There is a section which is work like a gallery. Every image is a background image (there are a LOT of them). When the user scrolls down, you can see, that the poor browser is trying to show the content to the user, but can't keep up with the user who has fast fingers.
Here is some of that beautiful html
<section class="gallery">
<div class="container">
<div class="row">
<div class="col-xs-12">
<div class="columns-content">
<a href="imageurl1">
<div class="image-content" style="background-image('img1.png')"></div>
</a>
<a href="imageurl2">
<div class="image-content" style="background-image('img2.png')"></div>
</a>
<!-- there are 30 more images like that -->
</div>
</div>
</div>
</div>
</section>
and here are some styles:
.image-content{
background-repeat: no-repeat;
background-size: cover;
background-position: center;
width: 100%;
height: 20vw;
display: inline-block;
position: relative;
vertical-align: bottom;
margin: 0px;
}
My question: Is there a way to prevent these images to repaint?
I tried the transform: translateZ(0);
and will-change: transform;
tricks but none of them worked for me. Should I quit and start crying in the corner about how useless I am?
Cheers!