简陋侧边栏
<!DOCTYPE html><html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>侧边栏</title>
<style>
body{
margin: 0px;
background-color: aqua;
height:1000px;
}
#wall{
width: 150px;
background-color: aqua;
position:absolute;
right:0px;
top:250px;
}
#wall a{
position: relative;
left: 120px;
display: block;
text-decoration: none;
background-color: white;
}
#wall a em{
font-style: normal;
display: inline-block;
height: 30px;
width: 30px;
background-color: blue;
color: white;
text-align: center;
margin-right: 30px;
}
#wall:hover a{
left: 0;
}
#wall a:hover{
background-color: Cyan;
}
#wall a:hover em{
background-color: DodgerBlue;
}
</style>
</head>
<body>
<div id="wall">
<a href="" style="-webkit-transition-duration: 0.1s;"><em>1</em>asdfg</a>
<a href="" style="-webkit-transition-duration: 0.2s;"><em>2</em>sdfgh</a>
<a href="" style="-webkit-transition-duration: 0.3s;"><em>3</em>dfghj</a>
<a href="" style="-webkit-transition-duration: 0.4s;"><em>4</em>fghjk</a>
<a href="" style="-webkit-transition-duration: 0.55s;"><em>5</em>ghjkl</a>
<a href="" style="-webkit-transition-duration: 0.6s;"><em>6</em>qwert</a>
<a href="" style="-webkit-transition-duration: 0.7s;"><em>7</em>werty</a>
<a href="" style="-webkit-transition-duration: 0.8s;"><em>8</em>ertyu</a>
<a href="" style="-webkit-transition-duration: 0.9s;"><em>9</em>asdfv</a>
<a href="" style="-webkit-transition-duration: 1s;"><em>10</em>fdmfigf</a>
<a href="" style="-webkit-transition-duration: 1.1s;"><em>11</em>dcf</a>
<a href="" style="-webkit-transition-duration: 1.2s;"><em>12</em>difj</a>
<a href="" style="-webkit-transition-duration: 1.3s;"><em>13</em>fdkfsd</a>
</div>
</body>
</html>
页:
[1]