Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"Contact Form"
Bootstrap 4.1.1 Snippet by
Reason706
4.1.1
Preview
HTML
CSS
View Full Screen
Fork
Fork this
728
 
0 Fav
Post to Facebook
Tweet this
<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>
.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); } .form-radio-group { width: 49%; display: inline-block; } .form-radio-input { display: none; } .form-radio-label { font-size: 1.6rem; cursor: pointer; position: relative; padding-left: 4.5rem; } .form-radio-button { height: 3rem; width: 3rem; border: 5px solid #311b92; border-radius: 50%; display: inline-block; position: absolute; left: 0; top: -.4rem; } .form-radio-button::after { content: ""; display: block; height: 1.3rem; width: 1.3rem; border-radius: 50%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: darkred; opacity: 0; transition: all .3s; } .form-radio-input:checked ~ .form-radio-label .form-radio-button::after { opacity: 1; }
Related:
See More
Free Template
Now UI Kit
141.8K
51
Contact Form
203.1K
56
Bootstrap Contact Form
109.1K
47
Bootstrap Contact Form
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76