What replaces nav lists in Bootstrap 3?

前端 未结 5 777
耶瑟儿~
耶瑟儿~ 2020-12-25 11:21

I am preparing to update my site to Bootstrap 3, but I can’t figure out how to replace the nav-list class from Bootstrap 2.

I looked into list groups, but I am not s

5条回答
  •  情深已故
    2020-12-25 12:08

    EDIT

    The removal of .nav-list has been documented in Migrating to v3.x – What’s removed:

    Nav lists
    .nav-list .nav-header
    No direct equivalent, but list groups and .panel-groups are similar.


    I found this change listed in the changelog inside the “WIP: Bootstrap 3” pull request:

    • Remove .nav-list option. Replaced by the new .list-group component.

    So if I translate your code to use .list-group instead, I get this:

    
    

    However, this does not look identical to the way it did in Bootstrap 2. As I noted in this answer’s comments, there seems to be no exact .nav-list equivalent built-in to Bootstrap 3. So if you need features that .list-group doesn’t have, you will have to write the CSS yourself, or try to port it from Bootstrap 2.

提交回复
热议问题