<!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-large" style="width:25%">
<a href="#" class="w3-bar-item w3-button">默认</a>
<a href="#" class="w3-bar-item w3-button w3-hover-none">无</a>
<a href="#" class="w3-bar-item w3-button w3-hover-none w3-hover-text-red">红色</a>
<a href="#" class="w3-bar-item w3-button w3-hover-none w3-hover-text-grey">灰色</a>
<a href="#" class="w3-bar-item w3-button w3-hover-none w3-hover-text-green">绿色</a>
<a href="#" class="w3-bar-item w3-button w3-hover-none w3-hover-text-blue">蓝色</a>
</div>
<div style="margin-left:25%">
<div class="w3-container w3-dark-grey">
<h1>我的页面</h1>
</div>
<div class="w3-container">
<p>当您将鼠标悬停在侧边栏内的链接上时,背景颜色将变为灰色。</p>
<p>您可以使用w3-hover-none类关闭悬停效果</p>
<p>如果仅在悬停时突出显示文本颜色,则可以使用w3-hover-text-color。</p>
</div>
</div>
</body>
</html>