使多个不确定高度的div等高对齐排列

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title></title> 
<style> 
.newspaper
{
    overflow:hidde;
}
    .a ,.b{
        border:1px solid red;
        float:left;
        width:40%;
        margin-bottom:-1000px;
        padding-bottom:1000px;
    }
</style>
</head>
<body>


<div class="newspaper">
    <div class="a">11</div>
    <div class="b">22</div>
</div>

</body>
</html>

 

菜鸟教程(runoob.com)

11
22
posted @ 2022-03-09 10:59  奶包迷了鹿  阅读(176)  评论(0)    收藏  举报