Extra spacing after an A Tag/img tag?(A 标签/img 标签后的额外间距?)
问题描述
您好,我正在尝试使用 div 标签构建表格单元格,同时这样做.我在单元格中添加了一个标签后,我得到了这个额外的间距.
<div 显示:行><div 显示:表格单元格><a><img/></a>我似乎无法弄清楚如何摆脱多余的间距.
我为 a 和 img 标签尝试了 display:inline.但不是运气.
如果有人可以帮助我摆脱这种间距,我将不胜感激.
示例 -- 就在阴影之前,此表格单元中有 2-3 像素的空白
解决方案 除了表格数据应该使用表格之外,我认为在图像上设置 display: block
将删除空间.如果这不起作用,请尝试制作一个 jsFiddle 页面来展示问题.
Hello i'm trying to build a table cell using div tag and while doing so. i get this extra spacing after my img a tag within the cell.
<div display:table>
<div display:row>
<div display:tabel-cell>
<a><img/></a>
I can't seem to figure out how to get rid of that extra spacing.
i tried display:inline for the a and img tag. yet not luck.
if anyone can help me get rid of this spacing i would gladly appreciate it.
Example -- right before the shadowing there a 2-3 pixel white space within this tabel-cell
解决方案 Aside from the fact that you should use tables for tabular data, I think that setting display: block
on the image will remove the space. If that doesn' work, try to make a jsFiddle page to show off the problem.
这篇关于A 标签/img 标签后的额外间距?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:A 标签/img 标签后的额外间距?


基础教程推荐
- html表格如何通过更改悬停边框来突出显示列? 2022-01-01
- 我可以在浏览器中与Babel一起使用ES模块,而不捆绑我的代码吗? 2022-01-01
- Chart.js 在线性图表上拖动点 2022-01-01
- 如何使用JIT在顺风css中使用布局变体? 2022-01-01
- 自定义 XMLHttpRequest.prototype.open 2022-01-01
- Vue 3 – <过渡>渲染不能动画的非元素根节点 2022-01-01
- 如何使用TypeScrip将固定承诺数组中的项设置为可选 2022-01-01
- 用于 Twitter 小部件宽度的 HTML/CSS 2022-01-01
- Electron 将 Node.js 和 Chromium 上下文结合起来意味着 2022-01-01
- 直接将值设置为滑块 2022-01-01