您的位置:首页 > Web前端 > CSS

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

2017-11-06 11:18 429 查看
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>


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: