2012-09-16 61 views

回答

3

这是我的一个建议,首先用浏览器开发工具检查东西&还有很多教程都与这类功能有关。

我为您创建了一个示例,可能会对您有所帮助。像这样写:

ul{ 
    border-bottom:1px solid red; 
} 
ul:after{ 
    content:''; 
    clear:both; 
    display:block; 
} 
li{ 
    float:left; 
    height:50px; 
    line-height:50px; 
    padding:0 10px; 
    border:1px solid red; 
    margin-bottom:-1px; 
} 
li.active{ 
    border-bottom:1px solid #fff; 
} 

入住这http://jsfiddle.net/Tj3LH/

+0

谢谢,负利润率诀窍! –

2

其实,有没有没有边界 - 它只是一个你没有看到...

你有集成开发工具浏览器? ;-)例如,如果您右键单击某个元素,则Safari或Chrome在上下文菜单中具有“Inspect元素”这个很酷的功能 - 瞧:这里是解决方案!

+0

谢谢!我尝试了相同的技巧,但内部元素的边框显示在元素内部,所以文本“热”有点高,但边框没有隐藏......我错过了什么? –

+0

他们处理.tabmenu里面的填充 - 也许这个?发布一个链接到您的工作,我可能会看到问题;-) –

+0

我会多尝试一些并回报。 –

2

您可以轻松地像

.tabmenu li.selected a { // this the tab menu item replace it with your tab menu item name 
color: orangeRed; 
background-color: white; 
border: 1px solid #5F99CF;// this is the color of box you need to specify 
border-bottom: 1px solid white; // this the color of bottom border, in reddit case it is white , you can replace it with what color you have in your website has to look like it is hidden 
z-index: 100; 
} 

希望这有助于你

2

这样如何做到这一点的CSS:

<div style="border-bottom:1px solid black;"> 
    <div style="float:left;">Tab 1</div> 
    <div style="float:left;border:1px solid black;border-bottom:1px solid white;margin-bottom: -1px;">Tab 1</div> 
    <div style="float:left;">Tab 1</div> 
    <br style="clear:both" /> 
</div> 

Here's a link

长话短说:border-bottom:1px solid white;margin-bottom:-1px;有窍门。

相关问题