How to draw lines through Bootstrap vertical divid

2019-04-08 08:35发布

I'm using Twitter Bootstrap I need to draw menu line this: https://www.dropbox.com/s/hl8moeabxxecu8j/dropdown.png .

So I need draw lines through vertical dividers.

Here what I have now - http://jsfiddle.net/KckU3/8/

I can't get how to make it ?

5条回答
▲ chillily
2楼-- · 2019-04-08 08:57

simply use

<hr class="divider">

that should give you what you want

查看更多
冷血范
3楼-- · 2019-04-08 08:59

If I understood you correctly

<li><hr></li>

Should be useful

查看更多
Summer. ? 凉城
4楼-- · 2019-04-08 09:05

First you had a typo in the .dropdown-toggle class.

Then, you are not looking for a vertical divider, which would look like a border, but for a border, and you just need to hide some of it.

Here is your clue :

.navbar .nav > li > a.dropdown-toggle {
    position: relative;
    bottom: -1px;
    z-index: 1005;
    background: white;
    padding-bottom: 12px;
}

ul.nav li.dropdown:hover ul.dropdown-menu {
    /* ... */
    border-top: 1px solid #000;
}

The padding-bottom is actually just one more pixel than defined by default.

The other important thing is the position to left or right :

ul.nav li.dropdown:hover ul.dropdown-menu {  
    /* ... */
    left: 0px;
}

I fixed a few other things for better effects, but you have the main idea.

Updated jsfiddle

查看更多
爷的心禁止访问
5楼-- · 2019-04-08 09:12

Your post is somewhat confusing, but from the image you posted, it appears you want to create a tabbed menu with a dropdown? If so, Bootstrap already lets you do that.

Tab Menus: http://twitter.github.com/bootstrap/components.html#navs Dropdowns: http://twitter.github.com/bootstrap/javascript.html#dropdowns

Here's a demo that puts it together: http://jsfiddle.net/LWTqS/

查看更多
forever°为你锁心
6楼-- · 2019-04-08 09:17

Now there is:

<li class="divider"></li>
查看更多
登录 后发表回答