美文网首页
右侧元素宽度自适应

右侧元素宽度自适应

作者: Jacqueline_JS | 来源:发表于2017-11-09 09:58 被阅读0次
<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

相关文章

网友评论

      本文标题:右侧元素宽度自适应

      本文链接:https://www.haomeiwen.com/subject/tbcpmxtx.html