<!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">
<h1><strong>w3-display-hover</strong> 类</h1>
<p>w3-display-hover 类将内容显示在 w3-display-container 内的悬停上(从隐藏到显示)。</p>
<div class="w3-display-container w3-light-grey" style="height:300px;">
<div class="w3-display-topleft w3-display-hover">左上方</div>
<div class="w3-display-topright w3-display-hover">右上方</div>
<div class="w3-display-bottomleft w3-display-hover">左下方</div>
<div class="w3-display-bottomright w3-display-hover">右下方</div>
<div class="w3-display-left w3-display-hover">左</div>
<div class="w3-display-right w3-display-hover">右</div>
<div class="w3-display-middle">将鼠标悬停在此框上!</div>
<div class="w3-display-topmiddle w3-display-hover">中间顶部</div>
<div class="w3-display-bottommiddle w3-display-hover">中间底部</div>
</div>
</div>
</body>
</html>