表格单元格框模型:额外的宽度和高度

编程入门 行业动态 更新时间:2024-10-10 05:22:35
本文介绍了表格单元格框模型:额外的宽度和高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

以下是表格单元格: developers.google / + / web / share /#sharelink-sizes

正如您在Chrome或Firefox中使用 inspect元素功能时所看到的,表格单元格的高度计算为105px×85px。但是,单元格内容(图片)只有64px x 64像素,单元格填充为6px 10px 6px 10px。我在元素样式中没有看到任何width和height属性,因此这个额外的宽度和高度来自哪里?

As you see when you use the inspect element feature in Chrome or Firefox, the total width and height of the table cell is calculated as 105px × 85px. However, the cell content (image) is only 64px × 64px and the cell padding is 6px 10px 6px 10px. I don't see any width and height properties in the element style, so where does this extra width and height come from?

推荐答案

它是一个表格单元格,因此浏览器将自动在单元格之间分配空间以填充表格的宽度。精确的宽度将取决于所有单元格的内容和表格的宽度。在这种情况下,表格被设置为浏览器窗口的百分比宽度,所以在我的1920x1080显示器,它实际上比在您的屏幕截图更大一点。

It's a table cell, so the browser will automatically distribute space among the cells to fill the width of the table. The exact width will depend upon the contents of all the cells and the width of the table. In this case, the table is set as a percentage width of the browser window, so on my 1920x1080 monitor, it's actually quite a bit bigger than in your screenshot.

>

更多推荐

表格单元格框模型:额外的宽度和高度

本文发布于:2023-11-23 01:04:36,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1619548.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:宽度   单元格   表格   模型   高度

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!