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 标签后的额外间距?


基础教程推荐
- Bootstrap 模态出现在背景下 2022-01-01
- Fabric JS绘制具有活动形状的多边形 2022-01-01
- 在 contenteditable 中精确拖放 2022-01-01
- 检查 HTML5 拖放文件类型 2022-01-01
- 原生拖动事件后如何获取 mouseup 事件? 2022-01-01
- 如何添加到目前为止的天数? 2022-01-01
- fetch 是否支持原生多文件上传? 2022-01-01
- Bokeh Div文本对齐 2022-01-01
- npm start 错误与 create-react-app 2022-01-01
- 即使用户允许,Gmail 也会隐藏外部电子邮件图片 2022-01-01