"Contact Form"
Bootstrap 4.1.1 Snippet by Reason706

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<div class="row d-flex justify-content-center">
<div class="col-md-8 bg-secondary">
<h2 class="text-center">Contact Us</h2>
<h3>Get in touch</h3>
<form>
<div class="form-group">
<input type="text" class="form-control form-input" id="name" aria-describedby="nameHelp" placeholder="Enter Name">
<label for="name" class="form-label">Name</label>
</div>
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email">
<small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
</div>
<div class="form-group">
<label for="exampleInputPassword1">Password</label>
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
</div>
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Check me out</label>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</div>
</div>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.form-group:not(:last-child) {
margin-bottom: 2rem; }
.form-input {
font-size: 1.5rem;
font-family: inherit;
color: inherit;
padding: 1.5rem 2rem;
border-radius: 2px;
background-color: rgba(255, 255, 255, 0.5);
border: none;
border-bottom: 3px solid transparent;
width: 90%;
display: block;
transition: all .3s;
}
.form-input:focus {
outline: none;
box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.1);
border-bottom: 3px solid #c40c0c; }
.form-input:focus:valid {
border-bottom: 3px solid #311b92; }
.form-input::-webkit-input-placeholder {
color: orangered; }
.form-label {
font-size: 1.2rem;
font-weight: 700;
margin-left: 2rem;
margin-top: .7rem;
display: block;
transition: all .3s; }
.form-input:placeholder-shown + .form-label {
opacity: 0;
visibility: hidden;
transform: translateY(-8rem); }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: