<!DOCTYPE html>
<html>
<head>
<title>W3.CSS(w3cschool.cn)</title>
<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
<link rel="stylesheet" href="https://7npmedia.w3cschool.cn/w3.css">
</head>
<body>
<div class="w3-container">
<h2>标签</h2>
<p>选项卡非常适合单页Web应用程序或能够显示不同主题的网页。点击下面的链接。</p>
</div>
<div class="w3-bar w3-black">
<button class="w3-bar-item w3-button" onclick="openCity('London')">伦敦</button>
<button class="w3-bar-item w3-button" onclick="openCity('Paris')">巴黎</button>
<button class="w3-bar-item w3-button" onclick="openCity('Tokyo')">东京</button>
</div>
<div id="London" class="w3-container city">
<h2>伦敦</h2>
<p>伦敦是英格兰的首都。</p>
</div>
<div id="Paris" class="w3-container city" style="display:none">
<h2>巴黎</h2>
<p>巴黎是法国的首都。</p>
</div>
<div id="Tokyo" class="w3-container city" style="display:none">
<h2>东京</h2>
<p>东京是日本的首都。</p>
</div>