最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Bootstrap實現(xiàn)彈性搜索框

 更新時間:2016年07月11日 10:06:36   投稿:mrr  
這篇文章主要介紹了Bootstrap實現(xiàn)彈性搜索框的相關(guān)資料,非常不錯,具有參考借鑒價值,需要的朋友可以參考下

Bootstrap是Twitter推出的一個用于前端開發(fā)的開源工具包。它由Twitter的設(shè)計師Mark Otto和Jacob Thornton合作開發(fā),是一個CSS/HTML框架。

接下來通過本文給大家介紹Bootstrap實現(xiàn)彈性搜索框的代碼,一起看下吧。

<form action="" method="get" class="form-horizontal">
<div class="input-group search-input-group">
<input type="hidden" name="scope" value="1">
<input name="key" autocomplete="off" type="text" class="form-control" placeholder="輸入要搜索的內(nèi)容關(guān)鍵字" >
<span class="input-group-addon">
<button type="submit">
<span class="glyphicon glyphicon-search"></span>
</button> 
</span>
</div>
</form>

對應(yīng)的CSS:

.search-input-group .input-group-addon{
background: white !important; 
}
.search-input-group .form-control{
border-right:0; 
box-shadow:0 0 0; 
border-color:#ccc;
}
.search-input-group{
width: 40%;
}
.search-input-group button{
border:0;
background:transparent;
}
.search-input-group input:focus + button{
z-index:3;
}
.search-input-group input{
-webkit-transition: width 0.2s ease-in-out;
-moz-transition:width 0.2s ease-in-out;
-o-transition: width 0.2s ease-in-out;
transition: width 0.2s ease-in-out;
}
.search-input-group input:focus{
width: 500px;
}

若想把搜索圖標放到輸入框的前面,bootstrap其實是不支持的,需要自己定制一下。

http://bootsnipp.com/snippets/featured/support-glyph-and-fa-icon-inside-input

以上所述是小編給大家介紹的Bootstrap實現(xiàn)彈性搜索框的全部敘述,希望對大家有所幫助,如果大家想了解更多內(nèi)容敬請關(guān)注腳本之家網(wǎng)站!

相關(guān)文章

最新評論

义马市| 溆浦县| 左云县| 洛浦县| 娱乐| 江达县| 井陉县| 株洲县| 株洲县| 库车县| 珠海市| 嘉兴市| 和田市| 盱眙县| 上蔡县| 扎兰屯市| 玛曲县| 唐河县| 阿图什市| 梅河口市| 衡山县| 天峨县| 武威市| 察隅县| 申扎县| 永登县| 宽城| 泸水县| 儋州市| 墨江| 尚义县| 且末县| 马关县| 大田县| 云和县| 乌拉特前旗| 获嘉县| 建瓯市| 雷山县| 新泰市| 无为县|