AltoCode
Cetara 4 Statistiche

HTML
<!-- ============================================ -->
<!-- Statistiche -->
<!-- ============================================ -->
<section id="stats-1361">
<div class="cs-container">
<ul class="cs-card-group">
<li class="cs-item">
<span class="cs-header">Progetti completati</span>
<span class="cs-number">886</span>
</li>
<li class="cs-item">
<span class="cs-header">Clienti soddisfatti</span>
<span class="cs-number">2K</span>
</li>
<li class="cs-item">
<span class="cs-header">Clienti abituali</span>
<span class="cs-number">475</span>
</li>
<li class="cs-item">
<span class="cs-header">Team di professionisti</span>
<span class="cs-number">37</span>
</li>
</ul>
</div>
<picture class="cs-background">
<source media="(max-width: 600px)" srcset="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/People/meeting6-m.jpg">
<source media="(min-width: 601px)" srcset="https://csimages2.nyc3.digitaloceanspaces.com/Contact-Page/generic-map.jpghttps://csimg.nyc3.cdn.digitaloceanspaces.com/Images/People/meeting6.jpg">
<img loading="lazy" decoding="async" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/People/meeting6.jpg" alt="incontro lavorativo" width="1280" height="568">
</picture>
</section>
CSS
/*-- -------------------------- -->
<--- Statistiche -->
<--- -------------------------- -*/
/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
#stats-1361 {
padding: var(--sectionPadding);
padding-top: clamp(23.125rem, 30vw, 29.375rem);
position: relative;
z-index: 1;
}
#stats-1361 .cs-container {
width: 100%;
max-width: 80rem;
margin: auto;
display: flex;
flex-direction: column;
align-items: center;
gap: clamp(3rem, 6vw, 4rem);
}
#stats-1361 .cs-card-group {
width: 100%;
margin: 0;
padding: 0;
display: grid;
grid-template-columns: repeat(12, 1fr);
}
#stats-1361 .cs-item {
list-style: none;
text-align: center;
grid-column: span 12;
display: flex;
justify-content: center;
align-items: stretch;
flex-direction: column;
gap: 1rem;
position: relative;
}
#stats-1361 .cs-item:last-of-type:after {
display: none;
}
#stats-1361 .cs-item:after {
content: "";
width: 100%;
height: 1px;
margin: 1.5rem 0;
background: #484848;
opacity: 1;
position: relative;
display: block;
}
#stats-1361 .cs-header {
font-size: 1rem;
line-height: 1.2em;
font-weight: 700;
margin: 0;
color: #fff;
display: block;
}
#stats-1361 .cs-number {
font-size: clamp(4.5rem, 10vw, 6.25rem);
line-height: 1em;
font-weight: 300;
margin: 0;
color: var(--primary);
display: block;
}
#stats-1361 .cs-background {
width: 100%;
height: 100%;
display: block;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
#stats-1361 .cs-background:before {
content: "";
position: absolute;
display: block;
height: 100%;
width: 100%;
background: #1a1a1a;
opacity: 0.72;
top: 0;
left: 0;
z-index: 1;
}
#stats-1361 .cs-background img {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
object-fit: cover;
}
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
#stats-1361 .cs-card-group {
row-gap: 2.5rem;
}
#stats-1361 .cs-item {
grid-column: span 6;
}
#stats-1361 .cs-item:nth-of-type(2):after {
display: none;
}
#stats-1361 .cs-item:after {
width: 1px;
height: 100%;
position: absolute;
top: 0;
right: 0;
}
}
/* Desktop - 1024px */
@media only screen and (min-width: 64rem) {
#stats-1361 {
overflow: hidden;
}
#stats-1361 .cs-item {
grid-column: span 3;
}
#stats-1361 .cs-item:nth-of-type(2):after {
display: block;
}
#stats-1361 .cs-item:after {
height: 200vw;
top: auto;
bottom: -18.75rem;
}
}
/* 1600px - Parallax Effect */
@media only screen and (min-width: 100rem) {
#stats-1361 .cs-background {
background: url("https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/People/meeting6.jpg");
background-size: cover;
background-position: center;
background-repeat: no-repeat;
background-attachment: fixed;
}
#stats-1361 .cs-background img {
display: none;
}
}