简体   繁体   English

标签无法在html网页jsfiddle上打开

[英]tabs not opening on html webpage jsfiddle

I have made a tabbed menu: http://jsfiddle.net/zWMYp/ 我做了一个选项卡式菜单: http : //jsfiddle.net/zWMYp/

However when I add it to my webpage, it does not open the tab content like above: http://jsfiddle.net/vL5VJ/ 但是,当我将其添加到我的网页时,它不会像上面那样打开选项卡内容: http : //jsfiddle.net/vL5VJ/

I am unsure what is interfering with the tabs. 我不确定是什么干扰了标签。

.css-tabs ul.noint11_menu li > div {
    z-index: -1;
}

is the culprit. 是罪魁祸首。 remove it (and add color: #fff ) and it will work 删除它(并添加color: #fff ),它将起作用

http://jsfiddle.net/vM5VJ/2/ http://jsfiddle.net/vM5VJ/2/

two issues here in your code 1) the z-index in the div under the a href have z-index of -1 thus it's behind everything else 2) the color of the text is almost the same as background 您的代码中的两个问题1)a href下div中的div中的z-index的z-index为-1,因此位于其他所有东西的后面2)文本的颜色与背景几乎相同

i've changed this css class as an example, you can use other methods such as define a css color for the div text; 我已经更改了此CSS类为例,可以使用其他方法,例如为div文本定义CSS颜色;

.css-tabs ul.noint11_menu li:target > div
{
    display:block;
    z-index:1;
    color:white;

}

here is the updated jsfiddle link http://jsfiddle.net/vM5VJ/3/ 这是更新的jsfiddle链接http://jsfiddle.net/vM5VJ/3/

my advise is to use google chrome to inspect the element, and incrementally remove or add css to figure out where is the problem. 我的建议是使用Google Chrome浏览器检查元素,并逐步删除或添加CSS以确定问题出在哪里。 I never liked looking at the whole code to figure out a very focus issue 我从不喜欢查看整个代码来找出非常关注的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM