Bootstrap CSS組件之面包屑導航(breadcrumb)
更新時間:2016年12月17日 11:28:05 作者:github_34514750
這篇文章主要為大家詳細介紹了Bootstrap CSS組件之面包屑導航(breadcrumb),具有一定的參考價值,感興趣的小伙伴們可以參考一下
面包屑breadcrumb一般用于導航,表示當前頁面所在的位置
面包屑可以設置其他相關的小標記內容,比如標簽、徽章標記等。
//源碼
//基礎樣式
.breadcrumb {
padding: 8px 15px;
margin-bottom: 20px;
list-style: none;
background-color: #f5f5f5;
border-radius: 4px;
}
//所有l(wèi)i項都是內聯(lián)塊方式
.breadcrumb > li {
display: inline-block;
}
//并且li項才起作用
.breadcrumb > li + li:before {
padding: 0 5px;
color: #ccc;
content: "/\00a0";
}
//設置當前項的顏色
.breadcrumb > .active {
color: #777;
}
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- Bootstrap從3.0版本開始全面支持移動平臺,貫徹移動先行宗旨 --> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap 101 Template</title> <!-- Bootstrap --> <link href="bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet"> </head> <body> <ul class="breadcrumb"> <li>HTML</li> <li>JS</li> <li>CSS</li> </ul> <!-- bootstrap是基于jQuery--> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script src="bootstrap-3.3.7-dist/js/bootstrap.min.js"></script> </body> </html>
本文系列教程整理到:Bootstrap基礎教程 專題中,歡迎點擊學習。
如果大家還想深入學習,可以點擊這里進行學習,再為大家附3個精彩的專題:
以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。
相關文章
webpack-bundle-analyzer?插件配置使用方法
webpack-bundle-analyzer?是?webpack?的插件,需要配合?webpack?和?webpack-cli?一起使用,這篇文章主要介紹了webpack-bundle-analyzer?插件配置,需要的朋友可以參考下2023-02-02

