您好,登錄后才能下訂單哦!
本篇內(nèi)容介紹了“bootstrap組件要怎么用”的有關(guān)知識,在實際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細閱讀,能夠?qū)W有所成!
bootstrap組件使用非常簡單,只需要引用相應(yīng)的類、和設(shè)置相應(yīng)HTML元素即可使用。
如:字體圖標
Bootstrap 捆綁了 200 多種字體格式的字形。
如需使用字體圖標,只需要簡單地使用下面的代碼即可。請在字體圖標和文本之間保留適當(dāng)?shù)目臻g。
<span class="glyphicon glyphicon-search"></span>
如:使用下拉菜單,只需要在 class .dropdown 內(nèi)加上下拉菜單即可。
下面的實例演示了基本的下拉菜單:需要js支持。
<!DOCTYPE html><html><head><meta charset="utf-8"> <title>Bootstrap 實例 - 下拉菜單(Dropdowns)</title><link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css"><script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script><script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script></head><body><div class="dropdown"><button type="button" class="btn dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown">主題<span class="caret"></span></button><ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1"><li role="presentation"><a role="menuitem" tabindex="-1" href="#">Java</a></li><li role="presentation"><a role="menuitem" tabindex="-1" href="#">數(shù)據(jù)挖掘</a></li><li role="presentation"><a role="menuitem" tabindex="-1" href="#">數(shù)據(jù)通信/網(wǎng)絡(luò)</a></li><li role="presentation" class="divider"></li><li role="presentation"><a role="menuitem" tabindex="-1" href="#">分離的鏈接</a></li></ul></div></body></html>
“bootstrap組件要怎么用”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識可以關(guān)注億速云網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實用文章!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。