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

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

左右百分比

两列布局, 左右为百分比,高度自适应。

效果:

 

代码:

<!DOCTYPE html>
<html>
<head>
    <title>左侧固定,右侧自适应</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style type="text/css">
        html,body{
            margin:0;
            height: 100%;
        }
        .cui_layout_container{
            height:100%;
        }
        .float_left{float:left;}
        .cui_layout_container .right_side,.cui_layout_container .left_side{
            height: 100%;
            overflow: auto;
        }
        .cui_layout_container .left_side{
            width:40%;   /*左侧宽度*/
            background-color:#ff7d20;
        }
        .cui_layout_container .right_side{
            background-color:#FFE69F;
            width:60%;  /*右侧宽度*/
        }
    </style>
</head>
<body>

<div class="cui_layout_container">

    <div class="left_side float_left">
        左侧40%
    </div>
    <div class="right_side float_left">
        右侧60%
    </div>

</div>


</body>
</html>

 

 

来源:https://www.cnblogs.com/ryanchancrj/p/9268966.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值