javascript - Animation search bar with css -


i'm working on css search field. want me something. if visit demo page see have menu in front of search button. search bar opened. want remain @ bottom front menu.

this demo page in jsfiddle

html code :

<div class="b_t_menu3">   <div class="b_search">     <form method="get" class="search-form" action="http://www.google.com/search" target="top"> <input name="sitesearch" value="beben-koben.blogspot.com" type="hidden"> <input type="search" class="search-field" placeholder="search &hellip;" value="" name="q" title="search for..." /> <input type="submit" class="search-submit" value="search" /> </form>   </div>          <div class="b_invitation"><a href="#">menu</a></div>          </div> 

and css code:

.b_t_menu3 {     float:left;     width:259px;     height:35px;     margin-left:2px;   border:1px solid #000; } .b_invitation {     float:left;     width:auto;     height:35px;     margin-left:12px;   positon:absolute;      } .b_invitation a{     color:#545454;     font-family:'lucida grande',tahoma,verdana,arial,sans-serif;     text-decoration:none;     line-height:35px;     font-size:11px;      } .b_search {  float:left;   width:35px;   height:35px;  } .search-form .search-submit {     display: none; } input[type="search"] {     -webkit-appearance: textfield;     width: 0; } input[type="search"]::-webkit-search-decoration {     -webkit-appearance: none; } .search-form {      right: 10px;     top: 0px; } .search-field {     background-color: transparent;     background-image: url(data:image/png;base64,ivborw0kggoaaaansuheugaaabgaaaaycayaaadgdz34aaabxuleqvriid2vmw4cmrbftwsk5v+zilvbeziwoahcccitkoi+6bahgosakwgcv0jkfngsislsloqqmpk7r3l/z+y/zt2jaaxjmaiivmu2npkucybb48yiiqqcmzhkjirniik1mppsm2f9bik9gwcaxt77wntfabiz8dmmn1gzjtmv1bxaxwyb6g4pir3mv3zvuugqaj2rgdqwvs6dc60knlojosr5nfed6oaqc35eitklowwahhefpezj8mzvm6cy48ymgztprzeqyuhivbcqfx9uueyawzogdrv9ubfgvs8iyjsdfjgxeo+l5gducoa0onfdaibxvccriyjsjrcvgs85f+ma7htc04mqvktkksu+5agz4a2kg0k5fkoim9geravdbtphimg3oqu70e+wo77e01mzaqbzla5v8w2gd+ecawsjolmfdndmwjnhvuqet7wnixxqf0h+rpnd6gc2q5kya5pwpgaaaabjru5erkjggg==);     background-position: 5px center;     background-repeat: no-repeat;     background-size: 24px 24px;     border: none;     cursor: pointer;     width: 0;     height: 35px;     margin: 0px 0;     padding: 0 0 0 35px;      -webkit-transition: width 400ms ease, background 400ms ease;     transition: width 400ms ease, background 400ms ease; } .search-field:focus {     background-color: #fff;     border: 2px solid #ccc;     cursor: text;     outline: 0;     width: 230px; } 

i solved answer wanted make animations search engine.i wanted make pop because space limited. there menu in front of pop search engine. after when click on search , search engine on menu i'd stay. i've never tried it. took care of problem. if helps, , wanted share you.

this working tutorial demo. jsfiddle html code:

<div class="b_t_menu3">   <div class="b_search">     <form method="get" class="search-form" action="http://www.google.com/search" target="top"> <input name="sitesearch" value="site içi arama" type="hidden"> <input type="search" class="search-field" placeholder="search &hellip;" value="" name="q" title="search for..." /> <input type="submit" class="search-submit" value="search" /> </form>   </div>          <div class="b_invitation"><a href="#">menu</a></div>          </div> 

css code:

.b_t_menu3 {     float:left;     width:259px;     height:35px;     margin-left:2px;   border:1px solid #000; } .b_invitation {     float:left;     width:auto;     height:35px;     margin-left:52px;   z-index:-3;     } .b_invitation a{     color:#545454;     font-family:'lucida grande',tahoma,verdana,arial,sans-serif;     text-decoration:none;     line-height:35px;     font-size:11px;     }  .b_search {  float:left;   width:auto;   height:35px;   background-color:#fff;   position:absolute; } .search-form .search-submit {     display: none; } input[type="search"] {     -webkit-appearance: textfield;     width: 0; } input[type="search"]::-webkit-search-decoration {     -webkit-appearance: none; } .search-form {      right: 10px;     top: 0px; } .search-field {     background-color: transparent;     background-image: url(data:image/png;base64,ivborw0kggoaaaansuheugaaabgaaaaycayaaadgdz34aaabxuleqvriid2vmw4cmrbftwsk5v+zilvbeziwoahcccitkoi+6bahgosakwgcv0jkfngsislsloqqmpk7r3l/z+y/zt2jaaxjmaiivmu2npkucybb48yiiqqcmzhkjirniik1mppsm2f9bik9gwcaxt77wntfabiz8dmmn1gzjtmv1bxaxwyb6g4pir3mv3zvuugqaj2rgdqwvs6dc60knlojosr5nfed6oaqc35eitklowwahhefpezj8mzvm6cy48ymgztprzeqyuhivbcqfx9uueyawzogdrv9ubfgvs8iyjsdfjgxeo+l5gducoa0onfdaibxvccriyjsjrcvgs85f+ma7htc04mqvktkksu+5agz4a2kg0k5fkoim9geravdbtphimg3oqu70e+wo77e01mzaqbzla5v8w2gd+ecawsjolmfdndmwjnhvuqet7wnixxqf0h+rpnd6gc2q5kya5pwpgaaaabjru5erkjggg==);     background-position: 5px center;     background-repeat: no-repeat;     background-size: 24px 24px;     border: none;     cursor: pointer;     width: 0;     height: 35px;     margin: 0px 0;     padding: 0 0 0 35px;     -webkit-transition: width 400ms ease, background 400ms ease;     transition: width 400ms ease, background 400ms ease;  } .search-field:focus {     background-color: #fff;     border: 2px solid #ccc;     cursor: text;     outline: 0;     width: 259px; } 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -