css实现左边高度自适应右边高度
css样式:
<style>
.container {
width: 960px;
height: 100%;
overflow: hidden;
margin: 0 auto;
}
.left {
height: 100%;
width: 100px;
overflow: hidden;
background: powderblue;
word-break: break-all;
padding-bottom: 9999px;
margin-bottom: -9999px;
float: left;
}
.right {
width: 100px;
float: left;
height: auto;
background: pink;
word-break: break-all;
}
</style>
html代码:
<div class="container"> <section class="left"> 鹅鹅鹅曲项向天歌 </section> <section class="right"> 床前明月光,疑是地上霜,举头望明月,低头思故乡 </section> </div>
还没有评论,来说两句吧...