css - 如何调整内容div的高度?
问题描述
我的应用中有标题 div、导航 div 和内容。如果需要,我想将 div 内容的高度调整为内容并使用滚动条。
div的CSS:
// the parent div
.bookManage {
height: 100%;
}
.books {
border-left: 1px solid gray;
overflow: auto;
height: 60%; // it is work only for specific number of elements. When I added more elements the height doesn't increase.
}
我也尝试:
// the parent div
.bookManage {
height: 100%;
}
.books {
border-left: 1px solid gray;
overflow: auto;
min-height: XXpx \ XX%; // the size of the div doesn't increase
}
解决方案
推荐阅读
- ios - 如何只提供回调函数或块,而不是创建符合 UIPickerViewDelegate 的对象?
- dart - 在 Scaffold Flutter 上设置 OnLongPressed 事件
- database - 撇号不会保存在数据库中
- javascript - 是否可以在 JS 中将语言环境字符串转换为带有千位分隔符的十进制数?
- php - 非常坚持正则表达式
- java - 如何使用 PDFBox 确定实际 PDF 内容的位置?
- angular - 检测是否可以在 adaljs-angular4 中进行静默登录
- javascript - 将输入从 component.html 发送到 component.ts
- c# - 在指定 X 值处向 MSChart 添加数据点或绘制椭圆
- javascript - JavaScript - babel-preset-env 不为 IE11 转换箭头函数