右侧元素宽度自适应

2017-11-09  本文已影响0人  Jacqueline_JS
<style>
        .outer{
            width:1170px;
            height: auto;
        }
        .left{
            width:200px;
            height: 50px;
            background-color: pink;
            float: left;
        }
        .right{
            height: 300px;
            background-color: cadetblue;
            overflow: auto;
        }
    </style>
<div class="outer">
    <div class="left">left</div>
    <div class="right">right</div>
</div>

效果:


捕获.JPG
上一篇 下一篇

猜你喜欢

热点阅读