<div class="wrapper">
<h1 class="header">Register</h1>
<p class="headerText">To get access to the app</p>
<form>
<div class="inputWrapper">
<label for="name">Name</label>
<input id="name" type="text" required>
</div>
<div class="inputWrapper">
<label for="email">E-mail</label>
<input id="email" type="email" required>
</div>
<div class="inputWrapper">
<label for="password">Password</label>
<input id="password" type="password" required>
</div>
<div class="inputWrapper">
<label for="repeatPassword">Repeat password</label>
<input id="repeatPassword" type="password" required>
</div>
<button type="submit" class="submitButton">Register</button>
</form>
</div>
<a class="link" href="https://hype4.academy/articles/coding/how-to-create-an-claymorphism-using-css">Read more about Claymorphism!</a>
* {
box-sizing: border-box;
}
body {
min-height: 100vh;
margin: 0;
background: #a2caff;
color: #576d95;
font-family: Arial;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.wrapper {
max-width: 400px;
width: 100%;
padding: 30px;
border-radius: 30px;
background: #fff;
box-shadow: 0 35px 68px 0 rgba(136, 174, 222, 0.42),
inset 0 -8px 16px 0 #b9d1f1;
}
.header {
font-size: 36px;
font-weight: 500;
margin: 0 0 12px;
text-align: center;
}
.headerText {
font-size: 16px;
margin: 0 0 24px 0;
text-align: center;
}
.inputWrapper {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
width: 100%;
margin: 0 0 16px 0;
label {
margin: 0 0 4px 0;
}
input {
width: 100%;
height: 40px;
padding: 8px 16px;
font-size: 16px;
border-radius: 8px;
border: 1px solid #b5d4ff;
color: #576d95;
outline-color: #236eb9;
}
}
.submitButton {
border: none;
padding: 12px 30px;
margin: 0 auto;
display: block;
font-size: 16px;
color: #fff;
border-radius: 8px;
background-image: linear-gradient(90deg, #5fc7ff 50%, #43a8ff 100%);
background-size: 200% 100%;
background-position: 100% 100%;
transition: background-position 256ms;
will-change: background-position;
cursor: pointer;
&:hover {
background-position: 00% 200%;
}
}
.link {
font-size: 16px;
margin: 50px 0 0 0;
display: block;
max-width: 400px;
width: 100%;
padding: 50px;
text-align: center;
color: #576d95;
border-radius: 30px;
background: #fff;
box-shadow: 0 35px 68px 0 rgba(136, 174, 222, 0.42),
inset 0 -8px 16px 0 #b9d1f1;
}
View Compiled
document.querySelector("form").addEventListener("submit", function(e){
e.preventDefault();
alert("Form submited!")
});
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.