首页 > 其他 > 详细

页面布局方案-左定宽,右自适应

时间:2018-07-05 16:37:06      阅读:145      评论:0      收藏:0      [点我收藏+]

左定宽,右自适应

两列布局,左边定宽,右边自适应,高度自适应。

效果:

技术分享图片

 

 代码:

 1 <!DOCTYPE html>
 2 <html>
 3 <head>
 4     <title>左侧固定,右侧自适应</title>
 5     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 6     <style type="text/css">
 7         html,body{
 8             margin:0;
 9             height: 100%;
10         }
11         .cui_layout_container{
12             height:100%;
13         }
14         .float_left{float:left;}
15         .cui_layout_container .right_side,.cui_layout_container .left_side{
16             height: 100%;
17             overflow: auto;
18         }
19         .cui_layout_container .left_side{
20             width:200px; /*左侧的宽度*/
21             background-color:#ff7d20;
22         }
23         .cui_layout_container .right_side{
24             background-color:#FFE69F;
25             margin-left: 200px; /*需要和上边设置一样*/
26         }
27         .cui_layout_container .right_side .right_side_content{
28             width:100%;
29             height:100%;
30             overflow: auto;
31         }
32     </style>
33 </head>
34 <body>
35 
36 <div class="cui_layout_container">
37 
38     <div class="left_side float_left">
39         左侧固定
40     </div>
41 
42     <div class="right_side">
43          <div class="right_side_content">
44          右侧自适应
45          </div>
46     </div>
47 </div>
48 
49 
50 </body>
51 </html>

 

页面布局方案-左定宽,右自适应

原文:https://www.cnblogs.com/ryanchancrj/p/9268942.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!