<!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-sidebar w3-bar-block w3-card w3-animate-left" style="display:none" id="leftMenu">
<button onclick="closeLeftMenu()" class="w3-bar-item w3-button w3-large">Close ×</button>
<a href="#" class="w3-bar-item w3-button">链接 1</a>
<a href="#" class="w3-bar-item w3-button">链接 2</a>
<a href="#" class="w3-bar-item w3-button">链接 3</a>
</div>
<div class="w3-sidebar w3-bar-block w3-card w3-animate-right" style="display:none;right:0;" id="rightMenu">
<button onclick="closeRightMenu()" class="w3-bar-item w3-button w3-large">Close ×</button>
<a href="#" class="w3-bar-item w3-button">链接 1</a>
<a href="#" class="w3-bar-item w3-button">链接 2</a>
<a href="#" class="w3-bar-item w3-button">链接 3</a>
</div>
<div class="w3-teal">
<button class="w3-button w3-teal w3-xlarge w3-left" onclick="openLeftMenu()">☰</button>
<button class="w3-button w3-teal w3-xlarge w3-right" onclick="openRightMenu()">☰</button>
<div class="w3-container">
<h1>我的主页</h1>
</div>
</div>
<div class="w3-container">
<p>在此示例中,我们演示了如何使用两个侧面导航。</p>
<p>我们创建了两个“菜单”按钮:一个从左侧打开侧面导航,另一个从右侧打开。</p>
</div>