Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 未在每个选项卡中显示的内容_Html - Fatal编程技术网

Html 未在每个选项卡中显示的内容

Html 未在每个选项卡中显示的内容,html,Html,我创建了一个简单的选项卡面板。唯一的问题是,当我单击每个选项卡时,内容不会相应地显示(假设每个选项卡中都会显示内容)。而是显示所有内容,而不首先选择。我想要的是,当我点击profile选项卡时,我只想显示profile的内容。但在本例中,所有这些都显示出来。下面是我的简单代码。tqs <html> <head> <script src="jquery-1.11.3.min.js" type="text/javascript"></script>

我创建了一个简单的选项卡面板。唯一的问题是,当我单击每个选项卡时,内容不会相应地显示(假设每个选项卡中都会显示内容)。而是显示所有内容,而不首先选择。我想要的是,当我点击profile选项卡时,我只想显示profile的内容。但在本例中,所有这些都显示出来。下面是我的简单代码。tqs

<html>
<head>
<script src="jquery-1.11.3.min.js" 
type="text/javascript"></script>
</head>


<body>

section {display:none;}
section:target {display:block;}





  <ul id="profileTabs" class="nav nav-tabs">
    <li class="active"><a href="#profile" data-toggle="tab">Profile</a></li>
    <li><a href="#about" data-toggle="tab">About Me</a></li>
    <li><a href="#match" data-toggle="tab">My Match</a></li>
</ul>


<article class="tabs">
 <section id='profile'>
    <p>Hi, this is the first tab.</p>
  </section>
  <section id='about'>
    <p>Hi, this is the second tab.</p>
  </section>
  <section id='match'>
    <p>Hi, this is the third tab.</p>
  </section>
</article>


</body>
  </html>

节{显示:无;}
节:目标{显示:块;}
嗨,这是第一个标签

嗨,这是第二个标签

嗨,这是第三个标签

简单地说:

小提琴:

节{显示:无;}
节:目标{display:block;}
嗨,这是第一个标签

嗨,这是第二个标签

嗨,这是第三个标签


你懂JavaScript吗?我懂一点。你能告诉我上面的代码哪里错了吗?请告诉我@Nabi。请不要使用链接作为答案(这在道德上很低,质量也很低)。请在这里直接解释@Nabi,这更方便。Tq为答案。该部分是css。