Skip to content

Commit 5ee305d

Browse files
committed
Formulário personalizado
1 parent 2af8385 commit 5ee305d

File tree

4 files changed

+130
-1
lines changed

4 files changed

+130
-1
lines changed

formulario/image/fundo.jpg

158 KB
Loading

formulario/index.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<html lang="pt-br">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<link rel="stylesheet" href="style.css">
8+
<title>Formulário Personalizado</title>
9+
</head>
10+
<body>
11+
<section class="form-container">
12+
<div class="container">
13+
<form>
14+
<h1>Entre em contato</h1>
15+
<p>Preencha o formulário abaixo e entraremos em contato com você</p>
16+
<div class="input-single">
17+
<input class="input" type="text" id="nome" required>
18+
<label for="nome">Seu nome completo</label>
19+
</div>
20+
<div class="input-single">
21+
<input class="input" type="text" id="email" required>
22+
<label for="email">Seu e-mail</label>
23+
</div>
24+
<div class="input-single">
25+
<input class="input" type="text" id="telefone" required>
26+
<label for="telefone">Seu telefone</label>
27+
</div>
28+
<div class="btn"><input type="submit" value="Enviar"></div>
29+
</form>
30+
</div><!--container-->
31+
</section>
32+
</body>
33+
</html>

formulario/style.css

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100;200;300;400;500;600;700;800;900&display=swap');
2+
3+
*{
4+
margin: 0;
5+
padding: 0;
6+
box-sizing: border-box;
7+
font-family: 'Outfit', sans-serif;
8+
}
9+
10+
body{
11+
width: 100%;
12+
height: 100vh;
13+
background-image: url(image/fundo.jpg);
14+
background-position: center;
15+
background-repeat: no-repeat;
16+
background-size: cover;
17+
display: flex;
18+
align-items: center;
19+
justify-content: center;
20+
}
21+
22+
.container{
23+
max-width: 1280px;
24+
margin: 0 auto;
25+
padding: 6%;
26+
}
27+
28+
form{
29+
background: #fff;
30+
max-width: 500px;
31+
height: 450px;
32+
padding: 40px;
33+
border-radius: 20px;
34+
}
35+
36+
form h1{
37+
text-align: center;
38+
margin-bottom: 10px;
39+
color: #2D5966;
40+
font-size: 22pt;
41+
}
42+
43+
form p{
44+
text-align: center;
45+
margin-bottom: 25px;
46+
}
47+
48+
form .input-single{
49+
position: relative;
50+
margin: 30px 0;
51+
}
52+
53+
form .input-single label{
54+
position: absolute;
55+
left: 0;
56+
bottom: 5px;
57+
cursor: text;
58+
transition: all 0.5s;
59+
color: #808080;
60+
}
61+
62+
form .input-single .input{
63+
width: 100%;
64+
border: 0;
65+
border-bottom: 2px solid #808080;
66+
padding: 5px;
67+
outline: 0;
68+
font-size: 16px;
69+
}
70+
71+
form .input-single .input:focus{
72+
border-bottom: 2px solid #2D5966;
73+
}
74+
75+
form .input-single .input:focus ~ label,
76+
form .input-single .input:valid ~ label{
77+
transform: translateY(-20px);
78+
font-size: 12px;
79+
color: #2D5966;
80+
}
81+
82+
.btn{
83+
width: 100%;
84+
text-align: center;
85+
}
86+
87+
form input[type=submit]{
88+
padding: 10px 40px;
89+
border: 0;
90+
border-radius: 10px;
91+
background-color: #2D5966;
92+
color: #fff;
93+
font-size: 14pt;
94+
cursor: pointer;
95+
}
96+

personalizar-input/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ form{
1111
top: 50%;
1212
left: 50%;
1313
transform: translate(-50%,-50%);
14-
border: 2px solid rgb(204, 204, 204);
14+
border: 2px solid #cccccc;
1515
padding: 50px;
1616
}
1717

0 commit comments

Comments
 (0)