html - Firefox css 高度 100% 问题。怎么修?
问题描述
我有一张桌子,里面有 div 的 tds。Div 应该适合所有 td 的高度。
tds有height: 1px;
tds 中的 div 有height: 100%;
这是页面的链接http://websitebuilder.su/workfox/index.php
但在 Firefox 中,这个技巧不起作用。我怎样才能让它无处不在?
解决方案
如果您将图像的样式更改为:
section.main_stages table td > div > div > img {
/* margin-top: 15px; */
/* margin-left: 8px; */
position: absolute;
top: 15px;
left: 8px;
}
将封闭的 div 向左浮动并给它一个相对位置:
section.main_stages table td > div > div {
width: calc(100% - 42px - 4px );
float: left;
padding-bottom: 24px;
position: relative;
}
并摆脱 100% 的高度:
section.main_stages table td > div {
width: auto;
/* height: 100%; */
}
这似乎可以在 FireFox 中修复它。
推荐阅读
- python - 双层优化算法 ==> Pyomo 中的实现
- python - 为什么通过列表元素增加变量会给我一个 IndexError?
- directed-acyclic-graphs - 任何任意 DAG 图都会产生多个拓扑顺序?
- sql - SELECT 事务似乎缓存在 postgres 上?
- arrays - 如何设置MongoDB返回文档的限制?
- api - 如何运行两个查询 i) 来自:ii) 使用 Postman 的 Twitter API 的关键字?
- docker - docker 无法找到 main.js 文件以使用 typeorm 在 nestjs 中运行后端
- flutter - Flutter - 将图像添加到 BottomNavigationBarItem
- spring - 使用 apache camel ftp 组件将文件移动到存档目录
- javascript - React useState hooks初始值为null,几秒钟后获得值然后不更新在哪里使用该值