Bootstrap nav-justified styles
Translation results:
nav
abbr.navigate sailing; navigation sailing; navigational sailing; navigable navigable
justified
英[ˈdʒʌstɪfaɪd] US[ˈdʒʌstəˌfaɪd]
adj. Justifiable, reasonable; for a reason
v. Adjust; prove... justified (past tense and past participle of justify)
Bootstrap nav-justified stylessyntax
Function: For tabs that are aligned at both ends, on a screen larger than 768px, the .nav-justified class can easily make the tabs or capsule labels appear to have the same width. On small screens, navigation links appear stacked.
Bootstrap nav-justified stylesexample
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Bootstrap 实例 - 标签页与胶囊式标签页</title> <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script> <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <h2>两端对齐的标签页</h2> <p>在大于 768px 的屏幕上,通过 .nav-justified 类可以很容易的让标签页或胶囊式标签呈现出同等宽度。在小屏幕上,导航链接呈现堆叠样式。</p> <ul class="nav nav-tabs nav-justified" role="tablist"> <li class="active"><a href="#">Home</a></li> <li><a href="#">HTML</a></li> <li><a href="#">CSS</a></li> <li><a href="#">About</a></li> </ul> <br> <ul class="nav nav-pills nav-justified" role="tablist"> <li class="active"><a href="#">Home</a></li> <li><a href="#">HTML</a></li> <li><a href="#">CSS</a></li> <li><a href="#">About</a></li> </ul> </div> </body> </html>
Click the "Run instance" button to view the online instance