打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
稳定灵活的 HTML 列式布局

主要特点:

  1. 所有列轻松实现相同高度
  2. 兼容性极高

------------------------------------------------ 代码 -----------------------------------------------------

<!DOCTYPE html>
< html xmlns="http://www.w3.org/1999/xhtml">
< head>
< title></title>
< meta http-equiv="cache-control" content="private" />
< style>
.col-layout {
height: 400px; /*布局的原始高度*/
border-collapse: collapse;
}

.col-layout .col {
padding: 0;
vertical-align: top;
}

.col-layout .left.col {
background-color: #557175;
}

.col-layout .right.col {
background-color: #635370;
}

.col-layout .col-content {
overflow: hidden;
}

.col-layout .left.col .col-content {
width: 400px; /*列宽度*/
}

.col-layout .right.col .col-content {
width: 600px;
}
< /style>
< /head>
< body>
< table class="col-layout">
< tr>
< td class="left col">
< div class="col-content">
< !--列的真正内容-->

<div style="height: 1000px; width: 2000px; background-color: #83dcbe">Will be hidden</div>
< /div>
< /td>
< td class="right col">
< div class="col-content">
< /div>
< /td>
< /tr>
< /table>

</body>
< /html>

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
css+html固定上下导航栏
盒子模型的实例
html+css如何在图片上添加文字
CSS 之布局
CSS布局之--淘宝双飞翼布局
vue vue
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服