響應(yīng)式框架Bootstrap柵格系統(tǒng)的實(shí)例
更新時(shí)間:2017年12月19日 08:33:34 作者:Aleno
下面小編就為大家分享一篇響應(yīng)式框架Bootstrap柵格系統(tǒng)的實(shí)例,具有很好的參考價(jià)值,希望對大家有所幫助。一起跟隨小編過來看看吧
實(shí)例如下:
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="css/bootstrap.min.css" rel="external nofollow" /> <script language="JavaScript" src="js/jquery-3.js"></script> <style type="text/css"> *{ top: 0px; padding: 0px; text-decoration: none; list-style-type: none; } .top-styl{ height: 50px; border: 1px solid red; background-color: #000000; } .img-styl{ width: 174px; height: 50px; background: url("imges/logo.png")no-repeat 0px 3px; background-size: contain; float: left; } .sousuo-styl{ width: 187px; float: left; } .top-search-input{ width: 150px; padding: 0 5px; height: 30px; border: 0; background: #363636; float: left; color: #ccc; } .top-search-submit{ width: 30px; height: 30px; border: 0; background: green url("imges/zoom.gif")center center no-repeat; float: left; cursor: pointer; //光標(biāo)指針 } .dao-styll{ float: left; font-size: 16px; width: 329px; margin-left: 33px; margin-top: 11px; } .dao-styll li{ float: left; position: relative; //相對定位 text-align: center; padding: 0 7px; } .dao-styll >li:hover{ background-color: #999; } .dao-styll >li >a{ color: #FFF; width: 100%; height: 34px; text-decoration: none; //取消下劃線 } .dz-styl{ float: right; margin: -19px -9px 6px 21px; } .imgs-styl{ padding: 11px 0px 0px 114px; float: right; margin: 0px -98px -3px 8px; } .green-styl{ color: green; } .zc-styl{ color: white; } a{ text-decoration: none; } </style> </head> <body> <div class="container-fluid"> //fluid表示用 百分比 <div class="row"> //row 行 <div class="top-styl col-md-12"> //col-md-12 每行桌面占12列 <div class="row"> <div class=" col-md-offset-1 col-md-9"> //col-md-offset-1 列偏移1列 <div class="row"> <div class="col-md-3 col-xs-4"> <div class="img-styl"></div> </div> <div class="col-md-3 "> <div class="sousuo-styl" style="padding-left: 7px; margin: 8px auto;"> <input class="top-search-input" value="" type="text"><input class="top-search-submit" type="submit" value="" /> </div> </div> <div class="col-md-4 hidden-xs" style="padding: 0px"> <ul class="dao-styll"> <li class=""><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >風(fēng)格</a> </li> <li class=""><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >造型師</a></li> <li class=""><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >眾分享</a> </li> <li class=""><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >我的美麗衣櫥</a></li> </ul> </div> <div class="col-md-2"> <div class="imgs-styl"> <img src="imges/sina.gif"> </div> <div class="dz-styl"> <span><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="green-styl">登錄</a> | </span><span> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="zc-styl">注冊</a></span> </div> </div> </div> </div> </div> </div> </div> <div class="row"> <div class="visible-md"><h1>當(dāng)前為桌面顯示</h1></div> //visible默認(rèn)占滿整行 <div class="visible-sm"><h1>當(dāng)前為平面顯示</h1></div> <div class="visible-xs"><h1>當(dāng)前為手機(jī)顯示</h1></div> </div> </div> </body> </html>
效果顯示圖:
以上這篇響應(yīng)式框架Bootstrap柵格系統(tǒng)的實(shí)例就是小編分享給大家的全部內(nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。
相關(guān)文章
pnpm install:ERR_PNPM_PEER_DEP_ISSUES Unmet p
這篇文章主要為大家介紹了pnpm install:ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies報(bào)錯(cuò)解決2023-06-06JavaScript對象封裝的簡單實(shí)現(xiàn)方法(3種方法)
這篇文章主要介紹了JavaScript對象封裝的簡單實(shí)現(xiàn)方法,結(jié)合實(shí)例形式分析了3種簡單實(shí)現(xiàn)方法與相關(guān)注意事項(xiàng),需要的朋友可以參考下2017-01-01千萬不要錯(cuò)過的JavaScript高效對比數(shù)組差異方法
前端開發(fā)中,我們通常需要對比兩個(gè)數(shù)組對象的差異。這其中有很多種方法,但是有些方法會帶來一些問題,所以本文為大家準(zhǔn)備了一個(gè)高效方法,需要的可以參考一下2023-05-05JavaScript面向?qū)ο笾w會[總結(jié)]
看過很多JavaScript書,對JavaScript的面向?qū)ο笾v的都比較深入,但是并沒有做到深入淺出,總結(jié)了我做的一些JavaScript程序的經(jīng)驗(yàn),以簡潔明了的文字使大家明白JavaScript面向?qū)ο蟮膶?shí)現(xiàn)。2008-11-11js計(jì)算時(shí)間差代碼【包括計(jì)算,天,時(shí),分,秒】
下面小編就為大家?guī)硪黄猨s計(jì)算時(shí)間差代碼【包括計(jì)算,天,時(shí),分,秒】。小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考2016-04-04Javascript insertAfter() 實(shí)現(xiàn)函數(shù)代碼
DOM沒有提供insertAfter()方法,我們可以自己擴(kuò)展下。2011-10-10