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
"Bootstrap Nav Serch | Serch Box Using css"
Bootstrap 4.1.1 Snippet by
Pushpender
4.1.1
Preview
HTML
CSS
View Full Screen
Fork
Fork this
4.0K
 
6 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"> <h2>Bootstrap Search Bar </h2> </div> <div class="row margin-top"> <div class="col-md"> <form class="form1"> <input type="text" placeholder="Serch..."> <a class="button-Serch"></a> </form> </div> <div class="col-md"> <form class="form2"> <input type="text" placeholder="Serch..."> <a class="button-Serch">Serch</a> </form> </div> <div class="col-md"> <form class="form3"> <input type="text" placeholder="Serch..."> <input id="search_submit" value="Rechercher" type="submit"> </form> </div> </div> </div>
body{background:#d9d9d9; color:#000;} h2{font-size:50px; text-align:center; display:block;width:100%; padding-bottom:50px;} .form1 .button-Serch { position: absolute; margin: auto; top: 0; right: 0; bottom: 0; left: 0; width: 40px; height: 40px; background: #00ACED; border-radius: 50%; transition: all 1s; z-index: 4; } .form1 .button-Serch:hover { cursor: pointer; } .form1 .button-Serch::before { content: ""; position: absolute; margin: auto; top: 11px; right: 0; bottom: 0; left: 11px; width: 12px; height: 2px; background: white; transform: rotate(45deg); transition: all .5s; } .form1 .button-Serch::after { content: ""; position: absolute; margin: auto; top: -5px; right: 0; bottom: 0; left: -5px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid white; transition: all .5s; } .form1 input { position: absolute; margin: auto; top: 0; right: 0; bottom: 0; left: 0; width: 50px; height: 50px; outline: none; border: 1px solid #d9d9d9; background: #fff; color: #333; padding: 0 80px 0 20px; border-radius: 30px; transition: all 1s; opacity: 0; z-index: 5; font-weight: bolder; } .form1 input:hover { cursor: pointer; } .form1 input:focus { width: 300px; opacity: 1; cursor: text; } .form1 input:focus ~ .button-Serch { right: -250px; background: #151515; z-index: 6; } .form1 input:focus ~ .button-Serch::before { top: 0; left: 0; width: 25px; } .form1 input:focus ~ .button-Serch::after { top: 0; left: 0; width: 25px; height: 2px; border: none; background: white; border-radius: 0%; transform: rotate(-45deg); } .form1 input::placeholder { color: #333; opacity: 0.5; font-weight: bolder; } /***form 2****/ .form2 {position:relative;} .form2 input{ width:100% ; border:1px solid #d9d9d9; padding:10px 15px; border-radius:200px; box-shadow:none } .form2 .button-Serch{ right:0; top:1px; position: absolute; background:#00ACED; color:#fff !important; padding:10px 25px; border-radius:200px; transition:all ease-in-out 0.5s; cursor:pointer; } .form2 .button-Serch:hover{background:#333;} /***form 3**/ .form3 input[type="text"] { height: 60px; font-size: 20px; display: inline-block; font-weight: 100; border: none; outline: none; color: #555; padding: 3px; padding-right: 60px; width: 0px; position: absolute; top: 0; right: 0; background: none; z-index: 3; transition: width .4s cubic-bezier(0.000, 0.795, 0.000, 1.000); cursor: pointer; } .form3 input[type="text"]:focus:hover { border-bottom: 1px solid #BBB; } .form3 input[type="text"]:focus { width: 100%; z-index: 1; border-bottom: 1px solid #BBB; cursor: text; } .form3 input[type="submit"] { height: 67px; width: 63px; display: inline-block; color:red; float: right; background: url("https://img.icons8.com/metro/1600/search.png") center center no-repeat; background-size:35px 35px; text-indent: -10000px; border: none; position: absolute; top: 0; right: 0; z-index: 2; cursor: pointer; opacity: 0.4; cursor: pointer; transition: opacity .4s ease; } .form3 input[type="submit"]:hover { opacity: 0.8; }
Related:
See More
Free Template
Bootstrap Wizard
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76