Collection - Add a hover effect to product images on your collection pages

Just realized there is a typo in my previous replies. I can’t edit the replies so I’ve pasted the corrected code here.

For Debut:

.reveal .hidden {
  display: block !important;
  visibility: visible !important;
}

.template-collection .product-card:hover .reveal img {
  opacity: 1;
  cursor: pointer;
}

.reveal {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
}

.reveal .hidden {
  position: absolute;
  z-index: -1;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  -webkit-transition: opacity 0.15s ease-in-out;
  -moz-transition: opacity 0.15s ease-in-out;
  -o-transition: opacity 0.15s ease-in-out;
  transition: opacity 0.15s ease-in-out;
}

.template-collection .product-card:hover .hidden {
  z-index: 1;
  opacity: 1;
}

.reveal .caption {
  position: absolute;
  top: 0;
  display: table;
  width: 100%;
  height: 100%;
  background-color: white;
  /* fallback for IE8 */
  background-color: rgba(255, 255, 255, 0.7);
  font: 13px/1.6 sans-serif;
  text-transform: uppercase;
  color: #333;
  letter-spacing: 1px;
  text-align: center;
  text-rendering: optimizeLegibility;
}

.reveal .hidden .caption .centered {
  display: table-cell;
  vertical-align: middle;
}

@media (min-width: 480px) and (max-width: 979px) {
  .reveal .caption {
    font-size: 11px;
  }
}

For Brooklyn:

/* ===============================================
// Reveal module
// =============================================== */

.reveal .hidden {
  display: block !important;
  visibility: visible !important;
}

.template-collection .product--wrapper:hover .reveal img {
  opacity: 1;
  cursor: pointer;
}

.reveal {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
}

.reveal .hidden {
  position: absolute;
  z-index: -1;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  -webkit-transition: opacity 0.15s ease-in-out;
  -moz-transition: opacity 0.15s ease-in-out;
  -o-transition: opacity 0.15s ease-in-out;
  transition: opacity 0.15s ease-in-out;
}

.template-collection .product--wrapper:hover .hidden {
  z-index: 1;
  opacity: 1;
}

.reveal .caption {
  position: absolute;
  top: 0;
  display: table;
  width: 100%;
  height: 100%;
  background-color: white;
  /* fallback for IE8 */
  background-color: rgba(255, 255, 255, 0.7);
  font: 13px/1.6 sans-serif;
  text-transform: uppercase;
  color: #333;
  letter-spacing: 1px;
  text-align: center;
  text-rendering: optimizeLegibility;
}

.reveal .hidden .caption .centered {
  display: table-cell;
  vertical-align: middle;
}

@media (min-width: 480px) and (max-width: 979px) {
  .reveal .caption {
    font-size: 11px;
  }
}
3 Likes