如何使左和右div固定和中心div可滚动 [英] how to make a left and right div fixed and center div scrollable

查看:158
本文介绍了如何使左和右div固定和中心div可滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的网站上,我有3个div。

In my webiste i have 3 divs.

<div class="main_div">
<div class="left"></div>
<div class="center"></div>
<div class="right"></div>
</div>

左类在左浮动,中部也在左浮动,右在右浮动。
如何固定左右类div并固定中心div可以像facebook.com一样滚动

the class left is float left and center is also float left and class right is float right. how to make the left and the right class div fixxed and the center div can be scrolled like facebook.com

推荐答案

您可能需要更新这样的属性。

You may need to update properties like this..

.left{position:fixed;left:0px;float:left;}
.right{position:fixed;right:0px;float:right;}
.center{position:absolute;left:value;float:left;} 

这篇关于如何使左和右div固定和中心div可滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆