<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width = device-width,initial-scale = 1.0"> <link rel="stylesheet" href="bootstrap.min.css"> <script src = "js/jquery-1.11.2.min.js"></script> <title>CSSDemo</title> </head> <body> <div class="container"> <ul class="breadcrumb"> <li><a href="#"> 泸沽湖</a></li> <li class="active"><a href="#">青海</a></li> <li><a href="#">阿里</a></li> <li><a href="#">林芝</a></li> </ul> </div> </body> </html>
<body> <div class="container"> <ul class="pagination"> <li><a href="#">«</a> </li> <li class="disabled"><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li class="active"><a href="#">4</a></li> <li><a href="#">5</a></li> <li><a href="#">»</a> </li> </ul> </div> </body>
<body> <div class="container"> <ul class="pager"> <li><a href="#">previous</a></li> <li><a href="#">next</a></li> </ul> </div> </body>
通过给li加上class .previous可以使链接左对齐,给li加上class .next可以使链接右对齐。
<body> <div class="container"> <ul class="pager"> <li class="previous"><a href="#">previous</a></li> <li class="next disabled"><a href="#">next</a></li> </ul> </div> </body>注意,是加disabled的。
<body> <div class="container"> <h2>西北<span class="label-warning">茶卡盐湖</span></h2> <h2>新疆<span class="label-danger">喀纳斯湖</span></h2> <h2>云南<span class="label-info">泸沽湖</span></h2> </div> </body>
<span class="badge"> 添加到链接、Bootstrap 导航等这些元素上即可。
<body> <div class="container"> <ul class="nav nav-pills nav-stacked col-lg-3"> <li class="active"> <a href="#"> <span class="badge pull-right">4000</span> 泸沽湖 </a> </li> <li><a href="#">青海湖</a></li> <li> <a href="#"> <span class="badge pull-right">30000</span> 九寨沟 </a> </li> </ul> </div> </body>
文章最后向大家推荐下webstorm编辑器,真的是好使得不要不要的,欲罢不能!!!