<html>
<head lang="en">
<meta charset="UTF-8">
<title>fixed</title>
<style>
*{
margin:0
padding: 0
}
.fixedMenu{
border: 1px solid #ccc
list-style: none
margin-top: -160px
position: fixed
right: 40px
top:50%
}
.fixedMenu li {
border-bottom: 1px solid #ccc
width: 80px
height: 80px
line-height: 80px
margin-bottom: -1px
text-align: center
}
</style>
</head>
<body>
<ul class="fixedMenu">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
</ul>
</body>
</html>
提示:你既然有页面效果就可以用F12,打开调试工具,看源码。