<!DOCTYPE html><html>
<head>
<meta charset=
"UTF-8"
>
<title></title>
<style type=
"text/css"
>
#sidemenu{ display: none; }
#sidemenu:checked + aside {
left: 0;
}
#sidemenu:checked ~ #wrap {
padding-left: 220px; }
aside {
position: absolute; top: 0; bottom: 0; left: -200px; width: 200px; background: black; transition: 0.2s ease-out;
}
h2 { color: white; text-align: center; font-size: 2em; }
#wrap { margin-left: 20px; padding: 10px; transition: 0.2s ease-out; }
label {
background: white; border-radius: 70px; color: orange; cursor: pointer; display: block; font-family: Courier New; font-size: 2em; width: 1.5em; height: 1.5em; line-height: 1.5em; text-align: center; display: inline-block; }
label:hover { background: #000; }
#sideul li { list-style: none; color: white; width: 100%; height: 1.8em; font-size: 1.5em; text-align: center; }
a { text-decoration: none; }
#sideul li:hover { color: orange; }
</style>
</head>
<body>
<input type=
'checkbox'
id=
'sidemenu'
>
<aside>
<h2>主菜单</h2>
<br />
<ul id=
"sideul"
>
<a href=
"##"
>
<li>首页</li>
</a>
<a href=
"##"
>
<li style=
"color: orange;"
>导航1</li>
</a>
<a href=
"##"
>
<li>导航2</li>
</a>
<a href=
"##"
>
<li>导航3</li>
</a>
<a href=
"##"
>
<li>导航4</li>
</a>
<a href=
"##"
>
<li>导航5</li>
</a>
<a href=
"##"
>
<li>导航6?</li>
</a>
</ul>
</aside>
<p id=
'wrap'
>
<label id=
'sideMenuControl'
for
=
'sidemenu'
>≡</label>
<!--
for
属性规定 label 与哪个表单元素绑定,即将这个控制侧边栏进出的按钮与checkbox绑定-->
</p>
</body></html>