首页 > Web开发 > 详细

【HTML+CSS】右侧固定,左侧自适应布局

时间:2018-05-08 12:56:42      阅读:190      评论:0      收藏:0      [点我收藏+]
    <style>
        *{
            padding: 0;
            margin: 0;
        }

        #left{
            float: right;
            width: 100%;
            height: 300px;
        }

        #box{
            margin-right:220px;
            background-color: pink;
            height: 300px;
        }
        #right{
            float: right;
            margin-right: -100%;
            width: 200px;
            height: 300px;
            background-color: yellow;
        }
    </style>

 

<div>
    <div id="left">
        <div id="box"></div>
    </div>

    <div id="right" ></div>
</div>

 

【HTML+CSS】右侧固定,左侧自适应布局

原文:https://www.cnblogs.com/code-klaus/p/9007309.html

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