101先生

css 等高布局

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>测试box-sizing</title>
<style>
    html, body, div {
        margin: 0;
        padding: 0;
    }

    #main {
        width: 100%;
        overflow: hidden;
    }
    #left {
        float: left;
        width: 10%;
        margin-bottom: -1000px;
        padding-bottom: 1000px;
        background: red;
    }
    #right {
        float: left;
        margin-bottom: -1000px;
        padding-bottom: 1000px;
        background: yellow;
    }

</style>
</head>
<body>
    <div id="main">
        <div id="left">
        dddddddddddddddddds</br>
        ssssssssssssss</br>
        ssssssssssssssss
        </div>
        <div id="right">ddddddddddsssssssssssssddddddddddsssssssssssssddddddddddsssssssssssssddddddddddsssssssssssss</div>
    </div>
</body>
</html>

 

posted on 2016-07-30 17:39  邹小邹168  阅读(130)  评论(0编辑  收藏  举报

导航