AltoCode
Omignano

HTML
<!-- ============================================ -->
<!-- Gallery -->
<!-- ============================================ -->
<section id="gallery-46">
<div class="cs-container">
<div class="cs-content">
<span class="cs-topper">Il Nostro Portfolio</span>
<h2 class="cs-title">AltoEletrical Installazioni di Generatori di Backup</h2>
<p class="cs-text">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptate
fugiat nesciunt facilis rerum, delectus amet. Nesciunt expedita saepe impedit soluta.
</p>
</div>
<div class="cs-image-group">
<div class="cs-item cs-item-1">
<picture class="cs-picture">
<source media="(max-width: 600px)" srcset="https://csimg.nyc3.digitaloceanspaces.com/Gallery/construction1-m.jpg">
<source media="(min-width: 601px)" srcset="https://csimg.nyc3.digitaloceanspaces.com/Gallery/construction1.jpg">
<img loading="lazy" decoding="async" src="https://csimg.nyc3.digitaloceanspaces.com/Gallery/construction1.jpg" alt="uomo che lavora acciaio" width="529" height="256">
</picture>
<div class="cs-hover-box">
<h3 class="cs-heading3">Nome del progetto</h3>
<span class="cs-subtitle">Sottotitolo</span>
<a class="cs-link" aria-label="scopri di più sul progetto" href="">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.01 11H5C4.45 11 4 11.45 4 12C4 12.55 4.45 13 5 13H16.01V14.79C16.01 15.24 16.55 15.46 16.86 15.14L19.64 12.35C19.83 12.15 19.83 11.84 19.64 11.64L16.86 8.85C16.55 8.53 16.01 8.76 16.01 9.2V11Z" fill="white" />
</svg>
Scopri di Più
</a>
</div>
</div>
<div class="cs-item cs-item-2">
<picture class="cs-picture">
<source media="(max-width: 600px)" srcset="https://csimg.nyc3.digitaloceanspaces.com/Gallery/construction2-m.jpg">
<source media="(min-width: 601px)" srcset="https://csimg.nyc3.digitaloceanspaces.com/Gallery/construction2.jpg">
<img loading="lazy" decoding="async" src="https://csimg.nyc3.digitaloceanspaces.com/Gallery/construction2.jpg" alt="falegname" width="255" height="255">
</picture>
<div class="cs-hover-box">
<h3 class="cs-heading3">Nome del progetto</h3>
<span class="cs-subtitle">Sottotitolo</span>
<a class="cs-link" aria-label="scopri di più sul progetto" href="">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.01 11H5C4.45 11 4 11.45 4 12C4 12.55 4.45 13 5 13H16.01V14.79C16.01 15.24 16.55 15.46 16.86 15.14L19.64 12.35C19.83 12.15 19.83 11.84 19.64 11.64L16.86 8.85C16.55 8.53 16.01 8.76 16.01 9.2V11Z" fill="white" />
</svg>
Scopri di Più
</a>
</div>
</div>
<div class="cs-item cs-item-3">
<picture class="cs-picture">
<source media="(max-width: 600px)" srcset="https://csimg.nyc3.digitaloceanspaces.com/Gallery/construction3-m.jpg">
<source media="(min-width: 601px)" srcset="https://csimg.nyc3.digitaloceanspaces.com/Gallery/construction3.jpg">
<img aria-hidden="true" loading="lazy" decoding="async" src="https://csimg.nyc3.digitaloceanspaces.com/Gallery/construction3.jpg" alt="griglia di armatura in acciaio" width="255" height="255">
</picture>
<div class="cs-hover-box">
<h3 class="cs-heading3">Nome del progetto</h3>
<span class="cs-subtitle">Sottotitolo</span>
<a class="cs-link" aria-label="scopri di più sul progetto" href="">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.01 11H5C4.45 11 4 11.45 4 12C4 12.55 4.45 13 5 13H16.01V14.79C16.01 15.24 16.55 15.46 16.86 15.14L19.64 12.35C19.83 12.15 19.83 11.84 19.64 11.64L16.86 8.85C16.55 8.53 16.01 8.76 16.01 9.2V11Z" fill="white" />
</svg>
Scopri di Più
</a>
</div>
</div>
<div class="cs-item cs-item-4">
<picture class="cs-picture">
<source media="(max-width: 600px)" srcset="https://csimg.nyc3.digitaloceanspaces.com/Gallery/construction4-m.jpg">
<source media="(min-width: 601px)" srcset="https://csimg.nyc3.digitaloceanspaces.com/Gallery/construction4.jpg">
<img aria-hidden="true" loading="lazy" decoding="async" src="https://csimg.nyc3.digitaloceanspaces.com/Gallery/construction4.jpg" alt="casa moderna" width="255" height="255">
</picture>
<div class="cs-hover-box">
<h3 class="cs-heading3">Nome del progetto</h3>
<span class="cs-subtitle">Sottotitolo</span>
<a class="cs-link" aria-label="scopri di più sul progetto" href="">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.01 11H5C4.45 11 4 11.45 4 12C4 12.55 4.45 13 5 13H16.01V14.79C16.01 15.24 16.55 15.46 16.86 15.14L19.64 12.35C19.83 12.15 19.83 11.84 19.64 11.64L16.86 8.85C16.55 8.53 16.01 8.76 16.01 9.2V11Z" fill="white" />
</svg>
Scopri di Più
</a>
</div>
</div>
<div class="cs-item cs-item-5">
<picture class="cs-picture">
<source media="(max-width: 600px)" srcset="https://csimg.nyc3.digitaloceanspaces.com/Gallery/construction5-m.jpg">
<source media="(min-width: 601px)" srcset="https://csimg.nyc3.digitaloceanspaces.com/Gallery/construction5.jpg">
<img aria-hidden="true" loading="lazy" decoding="async" src="https://csimg.nyc3.digitaloceanspaces.com/Gallery/construction5.jpg" alt="elettrodomestico" width="255" height="255">
</picture>
<div class="cs-hover-box">
<h3 class="cs-heading3">Nome del progetto</h3>
<span class="cs-subtitle">Sottotitolo</span>
<a class="cs-link" aria-label="scopri di più sul progetto" href="">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.01 11H5C4.45 11 4 11.45 4 12C4 12.55 4.45 13 5 13H16.01V14.79C16.01 15.24 16.55 15.46 16.86 15.14L19.64 12.35C19.83 12.15 19.83 11.84 19.64 11.64L16.86 8.85C16.55 8.53 16.01 8.76 16.01 9.2V11Z" fill="white" />
</svg>
Scopri di Più
</a>
</div>
</div>
<div class="cs-item cs-item-6">
<picture class="cs-picture">
<source media="(max-width: 600px)" srcset="https://csimg.nyc3.digitaloceanspaces.com/Gallery/construction6-m.jpg">
<source media="(min-width: 601px)" srcset="https://csimg.nyc3.digitaloceanspaces.com/Gallery/construction6.jpg">
<img aria-hidden="true" loading="lazy" decoding="async" src="https://csimg.nyc3.digitaloceanspaces.com/Gallery/construction6.jpg" alt="casa moderna" width="255" height="530">
</picture>
<div class="cs-hover-box">
<h3 class="cs-heading3">Nome del progetto</h3>
<span class="cs-subtitle">Sottotitolo</span>
<a class="cs-link" aria-label="scopri di più sul progetto" href="">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.01 11H5C4.45 11 4 11.45 4 12C4 12.55 4.45 13 5 13H16.01V14.79C16.01 15.24 16.55 15.46 16.86 15.14L19.64 12.35C19.83 12.15 19.83 11.84 19.64 11.64L16.86 8.85C16.55 8.53 16.01 8.76 16.01 9.2V11Z" fill="white" />
</svg>
Scopri di Più
</a>
</div>
</div>
</div>
<a href="" class="cs-button-solid">Scopri Tutti</a>
</div>
</section>
CSS
/*-- -------------------------- -->
<--- Gallery -->
<--- -------------------------- -*/
/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
#gallery-46 {
padding: var(--sectionPadding);
position: relative;
}
#gallery-46 .cs-container {
width: 100%;
max-width: 80rem;
margin: auto;
display: flex;
flex-direction: column;
align-items: center;
gap: clamp(3rem, 6vw, 4rem);
}
#gallery-46 .cs-content {
text-align: center;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
#gallery-46 .cs-image-group {
width: 100%;
margin: 0;
display: grid;
place-content: center;
grid-template-columns: repeat(12, 1fr);
grid-template-rows: 1fr;
gap: clamp(0.5rem, 1.5vw, 1.25rem);
}
#gallery-46 .cs-item {
width: 100%;
margin: 0;
aspect-ratio: 1;
grid-column: span 6;
display: block;
position: relative;
overflow: hidden;
}
#gallery-46 .cs-item:hover .cs-picture img {
transform: scale(1.1);
}
#gallery-46 .cs-item:hover .cs-hover-box {
opacity: 1;
pointer-events: all;
}
#gallery-46 .cs-item:hover .cs-heading3 {
opacity: 1;
transform: translateY(0);
}
#gallery-46 .cs-item:hover .cs-subtitle {
opacity: 1;
transform: translateY(0);
}
#gallery-46 .cs-item:hover .cs-link {
opacity: 1;
transform: translateY(0);
}
#gallery-46 .cs-picture {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
object-fit: cover;
}
#gallery-46 .cs-picture img {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
object-fit: cover;
transition: transform 0.6s;
}
#gallery-46 .cs-item-1 {
grid-column: 1 / span 12;
grid-row: 1 / 2;
aspect-ratio: 2.07594937;
}
#gallery-46 .cs-item-5 {
grid-column: 7 / span 6;
grid-row: 3 / span 2;
aspect-ratio: initial;
}
#gallery-46 .cs-hover-box {
height: 100%;
width: 100%;
padding: 1rem 0.625rem;
opacity: 0;
position: absolute;
z-index: 10;
display: flex;
flex-direction: column;
align-items: flex-start;
box-sizing: border-box;
transition: opacity 0.3s;
effect on the cs-item parent */
pointer-events: none;
position: relative;
}
#gallery-46 .cs-hover-box:before {
content: "";
width: 100%;
height: 100%;
background: var(--primary);
opacity: 0.9;
position: absolute;
display: block;
top: 0;
left: 0;
}
#gallery-46 .cs-heading3 {
font-size: clamp(1rem, 5vw, 1.25rem);
line-height: 1.2em;
margin: 0;
margin-bottom: 0.75rem;
color: var(--bodyTextColorWhite);
opacity: 0;
transform: translateY(0.625rem);
transition:
opacity 0.3s,
transform 0.5s;
}
#gallery-46 .cs-subtitle {
font-size: clamp(0.8125rem, 5vw, 0.9375rem);
line-height: 1.5em;
font-weight: bold;
text-transform: uppercase;
margin-bottom: auto;
color: var(--bodyTextColorWhite);
opacity: 0;
transform: translateY(0.625rem);
display: block;
transition:
opacity 0.3s,
transform 0.5s;
transition-delay: 0.1s;
}
#gallery-46 .cs-link {
font-size: 0.9375rem;
line-height: 1.5em;
font-weight: bold;
text-decoration: none;
color: #fff;
opacity: 0;
transform: translateY(0.625rem);
position: relative;
display: flex;
justify-content: flex-start;
align-items: center;
transition:
opacity 0.3s,
transform 0.5s;
transition-delay: 0.3s;
}
#gallery-46 .cs-link:hover:before {
width: 100%;
}
#gallery-46 .cs-link:before {
content: "";
position: absolute;
display: block;
height: 0.125rem;
width: 0%;
background: currentColor;
opacity: 1;
bottom: -0.125rem;
left: 0;
transition: width 0.3s;
}
#gallery-46 .cs-link svg {
margin-right: 0.5rem;
}
#gallery-46 .cs-button-solid {
font-size: 1rem;
line-height: clamp(2.875rem, 5.5vw, 3.5rem);
text-decoration: none;
font-weight: 700;
text-align: center;
margin: 0;
color: #fff;
min-width: 9.375rem;
padding: 0 1.5rem;
background-color: var(--primary);
border-radius: 0.25rem;
display: inline-block;
position: relative;
z-index: 1;
box-sizing: border-box;
}
#gallery-46 .cs-button-solid:before {
content: "";
position: absolute;
height: 100%;
width: 0%;
background: #000;
opacity: 1;
top: 0;
left: 0;
z-index: -1;
border-radius: 0.25rem;
transition: width 0.3s;
}
#gallery-46 .cs-button-solid:hover:before {
width: 100%;
}
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
#gallery-46 .cs-item {
grid-column: span 3;
}
#gallery-46 .cs-item-1 {
grid-column: 1 / span 6;
}
#gallery-46 .cs-item-2 {
grid-column: 1 / span 3;
grid-row: 2;
}
#gallery-46 .cs-item-3 {
grid-column: 4 / span 3;
grid-row: 2;
}
#gallery-46 .cs-item-5 {
grid-column: 7 / span 3;
grid-row: 2;
}
#gallery-46 .cs-item-6 {
grid-column: 10 / span 3;
grid-row: 1 / span 2;
aspect-ratio: initial;
}
}