css实现左边高度自适应右边高度

来源:互联网 发布:超级课程表 知乎 编辑:程序博客网 时间:2024/04/30 21:23
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>

这里写图片描述

原创粉丝点击