<nav>
<div class="brand">
<i class="gg-coffee"></i>
<h1>Form </h1>
</div>
<ul>
<li><i class="gg-facebook"></i></li>
<li>X</li>
<li><i class="gg-instagram"></i></li>
</ul>
</nav>
<div id="firstDiv">
<div class="firstDiv-container">
<h2 class="center-text mentally">Bienvenidos a Cafe de finca 100</h2>
<button onclick="showSecondDiv()" class="button-style">Llenar el Formulario </button>
</div>
</div>
<div id="secondDiv">
<h1>Formulario de Registro</h1>
<form id="registrationForm">
<label for="name">Name:</label>
<input type="text" id="name" name="name" required>
<br><br>
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<br><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
<br><br>
<input type="submit" value="Register" class="button-style">
</form>
</div>
<div class="toolbox">
</div>
<div class="itmc">
</div>
@import url("https://fonts.cdnfonts.com/css/zwizz");
@import url("https://fonts.cdnfonts.com/css/menttally-weignota");
@import url("https://unpkg.com/css.gg@2.0.0/icons/css/coffee.css");
@import url("https://unpkg.com/css.gg@2.0.0/icons/css/facebook.css");
@import url("https://unpkg.com/css.gg@2.0.0/icons/css/instagram.css");
html {
font-family: "Zwizz", sans-serif;
height: 100%;
}
nav {
align-items: center;
display: flex;
width: 100%;
height: 40px;
color: white;
}
.brand {
width: 50%;
}
h1 {
font-family: "Menttally Weignota", sans-serif;
}
.mentally {
font-family: "Menttally Weignota", sans-serif;
}
ul {
width: 40%;
display: flex;
justify-content: flex-end;
gap: 15px;
}
li {
list-style: none;
}
#firstDiv {
width: 100%;
height: 100vh;
}
.firstDiv-container {
margin: 0 auto;
width: 80%;
height: 50%;
background: white;
border-radius: 5px;
box-shadow: 6px 3px 21px -1px rgba(0, 0, 0, 0.51);
transition: opacity 0.5s;
}
#secondDiv {
display: none; /* Hide the second div initially */
margin: 0 auto;
width: 80%;
height: 50%;
background: white;
border-radius: 5px;
box-shadow: 6px 3px 21px -1px rgba(0, 0, 0, 0.51);
transition: opacity 0.5s;
transition: opacity 0.9s;
}
body {
margin: 0;
background: linear-gradient(
15deg,
rgba(173, 83, 137, 0.5),
rgba(102, 85, 68, 0.5)
),
url("https://res.cloudinary.com/dnpexwdy2/image/upload/v1716575315/samples/coffee.jpg")
no-repeat center center; /* Image */
background-size: cover; /* Ensure the image covers the entire element */
//background-repeat: no-repeat;
//background-size: 100%;
}
.center-text {
text-align: center;
}
input {
width: 60%;
padding: 10px 5px;
}
.button-style {
background-color: #665544;
border: 0;
width: 200px;
height: 50px;
border-radius: 5px;
color: white;
display: block;
margin: 0 auto;
}
.toolbox {
width: 150px;
height: 50px;
background-color: white;
}
function showSecondDiv() {
document.getElementById("firstDiv").style.display = "none"; // Hide the first div
document.getElementById("secondDiv").style.display = "block"; // Show the second div
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.