效果如图所示:
展开前:
展开后:
原理是通过设置左侧margin来控制菜单的显示隐藏
源码:
<html>
<head>
<title>SlideBar</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<style type="text/css">
#menuBar {
position: absolute;
left: -200px;
width: 226px;