<!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>
<div class="w3-container">
<h2>W3.CSS模式</h2>
<p>使用w3-container类在模式中创建不同的部分(例如,页眉和页脚)。</p>
<button onclick="document.getElementById('id01').style.display='block'" class="w3-button w3-black">打开模式</button>
<div id="id01" class="w3-modal">
<div class="w3-modal-content">
<header class="w3-container w3-teal">
<span onclick="document.getElementById('id01').style.display='none'"
class="w3-button w3-display-topright">×</span>
<h2>模式头部</h2>
</header>
<div class="w3-container">
<p>一些文本..</p>
<p>一些文本..</p>
</div>
<footer class="w3-container w3-teal">
<p>模式页脚</p>
</footer>
</div>
</div>
</div>
</body>
</html>