AltoCode
Garaguso

HTML
<!-- ============================================ -->
<!-- FORM -->
<!-- ============================================ -->
<section id="contact-1970">
<div class="cs-container">
<div class="cs-content">
<h1 class="cs-title">Quanto Renderà la Tua Proprietà per Affitti Vacanze?</h1>
<p class="cs-text">
Il nostro team ti fornirà un’analisi finanziaria approfondita dell’immobile che combina dati
storici proprietari, immobili comparabili nella zona e prezzi aggiornati in tempo reale.
</p>
</div>
<div class="cs-right">
<form class="cs-form" id="cs-form-1970" name="Form Contatti" method="post">
<label class="cs-label">
Nome
<input class="cs-input" required type="text" id="first-name-1970" name="Nome">
</label>
<label class="cs-label">
Cognome
<input class="cs-input" required type="text" id="last-name-1970" name="Cognome">
</label>
<label class="cs-label">
Email
<input class="cs-input" required type="email" id="email-1970" name="email">
</label>
<label class="cs-label">
Telefono
<input class="cs-input" required type="tel" id="phone-1970" name="Telefono">
</label>
<label class="cs-label">
Numero di camere da letto
<input class="cs-input" required type="text" id="bedrooms-1970" name="Numero di camere da letto">
</label>
<label class="cs-label">
Indirizzo della proprietà
<input class="cs-input" required type="text" id="address-1970" name="Indirizzo">
</label>
<button class="cs-button-solid cs-submit" type="submit">Ottieni una Stima</button>
</form>
</div>
</div>
<picture class="cs-background">
<source media="(max-width: 600px)" srcset="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/Landscapes/downtown.jpeg">
<source media="(min-width: 601px)" srcset="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/Landscapes/downtown.jpeg">
<img loading="lazy" decoding="async" src="https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/Landscapes/downtown.jpeg" alt="città sfondo" width="1920" height="640">
</picture>
</section>
CSS
/*-- -------------------------- -->
<--- FORM -->
<--- -------------------------- -*/
/* Mobile - 360px */
@media only screen and (min-width: 0rem) {
#contact-1970 {
padding: var(--sectionPadding);
overflow: hidden;
position: relative;
z-index: 1;
}
#contact-1970 .cs-container {
width: 100%;
max-width: 44rem;
margin: auto;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
gap: clamp(2.5rem, 5vw, 5rem);
}
#contact-1970 .cs-content {
text-align: center;
width: 100%;
max-width: 38.875rem;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;
}
#contact-1970 .cs-title {
max-width: 51.8125rem;
color: #fff;
}
#contact-1970 .cs-text {
color: #f7f7f7;
}
#contact-1970 .cs-right {
text-align: center;
width: 100%;
box-sizing: border-box;
padding: 1.5rem;
background-color: #fff;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
position: relative;
z-index: 1;
}
#contact-1970 .cs-form {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
column-gap: clamp(1rem, 2vw, 1.25rem);
row-gap: 0.75rem;
}
#contact-1970 .cs-label {
font-size: 0.875rem;
width: 100%;
color: #767676;
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
gap: 0.25rem;
}
#contact-1970 .cs-input,
#contact-1970 select {
font-size: 1rem;
width: 100%;
height: 3.5rem;
box-sizing: border-box;
padding: 0;
padding-left: 1.5rem;
background-color: #f7f7f7;
color: var(--bodyTextColor);
border: none;
transition: border-color 0.3s;
}
#contact-1970 .cs-input:hover,
#contact-1970 select:hover {
border-color: var(--secondary);
}
#contact-1970 .cs-input:focus,
#contact-1970 select:focus {
outline: 1px solid var(--secondary);
}
#contact-1970 .cs-input::placeholder,
#contact-1970 select::placeholder {
color: #7d799c;
opacity: 0.6;
}
#contact-1970 .cs-textarea {
font-family: inherit;
min-height: 5.9375rem;
margin-bottom: 0.75rem;
padding-top: 1.5rem;
}
#contact-1970 .cs-button-solid {
font-size: 1rem;
font-weight: 700;
line-height: clamp(2.875rem, 5.5vw, 3.5rem);
text-align: center;
text-decoration: none;
min-width: 12.5rem;
margin: 0;
box-sizing: border-box;
padding: 0 1.5rem;
background-color: var(--primary);
overflow: hidden;
color: #fff;
display: inline-block;
position: relative;
z-index: 1;
}
#contact-1970 .cs-button-solid:before {
content: "";
width: 0%;
height: 100%;
background: #000;
opacity: 1;
position: absolute;
top: 0;
left: 0;
z-index: -1;
transition: width 0.3s;
}
#contact-1970 .cs-button-solid:hover:before {
width: 100%;
}
#contact-1970 .cs-submit {
width: 100%;
margin: 1.5rem 0 0 0;
border: none;
}
#contact-1970 .cs-submit:hover {
cursor: pointer;
}
#contact-1970 .cs-background {
width: 100%;
height: 100%;
display: block;
position: absolute;
top: 0;
left: 0;
z-index: -2;
}
#contact-1970 .cs-background:before {
content: "";
width: 100%;
height: 100%;
background: linear-gradient(0deg, rgba(26, 26, 26, 0.8) 0%, rgba(26, 26, 26, 0.8) 100%);
pointer-events: none;
opacity: 1;
display: block;
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
#contact-1970 .cs-background img {
width: 100%;
height: 100%;
object-fit: cover;
position: absolute;
top: 0;
left: 0;
}
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
#contact-1970 .cs-right {
max-width: 36.125rem;
padding: 3rem 2rem;
}
#contact-1970 .cs-form {
display: grid;
grid-template-columns: repeat(12, 1fr);
}
#contact-1970 .cs-label {
grid-column: span 12;
}
#contact-1970 .cs-label:nth-of-type(1),
#contact-1970 .cs-label:nth-of-type(2),
#contact-1970 .cs-label:nth-of-type(3),
#contact-1970 .cs-label:nth-of-type(4),
#contact-1970 .cs-label:nth-of-type(5),
#contact-1970 .cs-label:nth-of-type(6) {
grid-column: span 6;
}
#contact-1970 .cs-submit {
grid-column: span 12;
}
}
/* Desktop - 1024px */
@media only screen and (min-width: 64rem) {
#contact-1970 .cs-container {
max-width: 80rem;
flex-direction: row;
justify-content: space-between;
flex-wrap: nowrap;
}
#contact-1970 .cs-content {
text-align: left;
align-items: flex-start;
}
}
/* Desktop Parallax Effect - 1600px */
@media only screen and (min-width: 100rem) {
#contact-1970 {
background: url("https://csimg.nyc3.cdn.digitaloceanspaces.com/Images/Landscapes/downtown.jpeg");
background-position: center;
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
}
#contact-1970 .cs-background img {
display: none;
}
}