点击收缩左边栏,右边100%显示

04 09th,2011

点击收缩左边栏,右边100%显示(兼容ie6,ie8,firefox),在设计论坛或开发软件时会涉及到收缩左边栏,使右边100%显示。

收缩左边栏

点击收缩左边栏,右边100%显示(兼容ie6+,firefox)主要代码如下:

CSS代码:

html,body {margin:0; padding:0;height:100%;width:100%;border:none; }
.main {width:100%;height:100%;text-align:left;}
.main_left {width:180px;background:green;}
.main_right { height:100%;background:#f4be14;}
.picBox {background:#337ABB url(images/right.gif) no-repeat center center;
width:9px; }
.main_left,.picBox {float:left;height:100%; _margin-right:-3px; }

Html代码:

左边
右边

Demo:

此条目发表于2011年04月09日发表在css实例分类目录,贴了, 等标签。

将此文章固定链接点击收缩左边栏,右边100%显示加入收藏夹。

2 位高人已经发表见解 于 “点击收缩左边栏,右边100%显示”

  1. 小林 说道:

    你的网站改用CSS3了?

发表见解

(必填)

(必填,不公开)

(以便回访)