(Squarespace) Add a black overlay on Product block on hover

To add a black overlay on Product block on hover, you can use this code to Custom CSS box.

If code doesn’t work, you can comment below, message or email me.

div.product-block .image-container a:after {
    content: "";
    background-color: rgba(0,0,0,0.75);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: all 0.3s ease;
}
div.product-block:hover .image-container a:after {
    opacity: 1;
    transition: all 0.3s ease;
}

Result

To change overlay color, change this line.

1 Like