星空网 > 软件开发 > 网页设计

CSS模拟position:fixed,一边滚动,一边不滚动

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>模拟position:fixed</title>
</head>
<style>
* { padding:0; margin:0;}
body { height:100%; overflow:hidden; font-size:14px; line-height:2; position:relative;}
html { height:100%; overflow:hidden;}
.fixed { position:absolute; top:10px; left:10px; width:200px; height:350px; background:#fc0; border:1px solid #f60;}
.wrapper { height:100%; overflow:auto;}
.body { padding-top:10px; margin-left:232px;}
</style>
<body>
<div >左边无论怎么滚动这个窗口它都不会动的</div>
<div >
<div >
<li><a href="http://www.cnblogs.com//soft/1843.shtml" target="_blank">显示内容1显示内容1显示内容1显示内容1</a></li><li><a href="http://www.cnblogs.com//soft/1986.shtml" target="_blank">显示内容2显示内容2显示内容


2</a></li><li><a href="http://www.cnblogs.com//soft/4374.shtml" target="_blank">显示内容3显示内容3显示内容3</a></li><li><a href="http://www.cnblogs.com//soft/1060.shtml" target="_blank">显示内容4显示内容4显示内容


4</a></li><li><a href="http://www.cnblogs.com//soft/4609.shtml" target="_blank">显示内容5显示内容5显示内容5</a></li><li><a href="http://www.cnblogs.com//soft/1078.shtml" target="_blank">显示内容6显示内容


6</a></li><li><a href="http://www.cnblogs.com//soft/2030.shtml" target="_blank">显示内容7显示内容7显示内容7</a></li><li><a href="http://www.cnblogs.com//soft/3119.shtml" target="_blank">显示内容8显示内容8显示内容


8</a></li><li><a href="http://www.cnblogs.com//soft/2927.shtml" target="_blank">显示内容9显示内容9显示内容</a></li><li><a href="http://www.cnblogs.com//soft/2460.shtml" target="_blank">显示内容10显示内容


10</a></li><li><a href="http://www.cnblogs.com//soft/5654.shtml" target="_blank">显示内容11显示内容11</a></li><li><a href="http://www.cnblogs.com//soft/3353.shtml" target="_blank">显示内容12显示内容


12</a></li><li><a href="http://www.cnblogs.com//soft/1852.shtml" target="_blank">显示内容13显示内容13</a></li><li><a href="http://www.cnblogs.com//soft/1843.shtml" target="_blank">显示内容14显示内容


14</a></li><li><a href="http://www.cnblogs.com//soft/1986.shtml" target="_blank">显示内容15显示内容15</a></li><li><a href="http://www.cnblogs.com//soft/4374.shtml" target="_blank">显示内容16显示内容


16</a></li><li><a href="http://www.cnblogs.com//soft/1060.shtml" target="_blank">显示内容17显示内容17</a></li><li><a href="http://www.cnblogs.com//soft/4609.shtml" target="_blank">显示内容18显示内容


18</a></li><li><a href="http://www.cnblogs.com//soft/1078.shtml" target="_blank">显示内容19显示内容19</a></li><li><a href="http://www.cnblogs.com//soft/2030.shtml" target="_blank">显示内容20显示内容


20</a></li><li><a href="http://www.cnblogs.com//soft/3119.shtml" target="_blank">显示内容21显示内容21</a></li><li><a href="http://www.cnblogs.com//soft/2927.shtml" target="_blank">显示内容22显示内容22</a></li>
</div>
</div>
<div>http://www.999jiujiu.com/</div>
</body>
</html>




原标题:CSS模拟position:fixed,一边滚动,一边不滚动

关键词:CSS

CSS
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流