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

论坛 期权论坛 脚本     
匿名网站用户   2020-12-20 13:32   33   0
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>

这里写图片描述

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:1136255
帖子:227251
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP