如何删除 HTML 中字符之间的空格?填充不起作用 [英] How can I remove the space between a character in HTML? Padding doesn't work

查看:31
本文介绍了如何删除 HTML 中字符之间的空格?填充不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么在字母അ"之前有空格(用红色标记),即使我添加了 0px 的填充?

Why is there space(marked in red color) before the letter 'അ', even if I added padding as 0px?

<span style="margin:0;padding:0;border:1px solid blue;font-size:128px">അ</span>

推荐答案

那个空格是字体的一部分.在其上使用负 letter-spacing margin-left 以将其删除.

That space is part of the font. Use a negative letter-spacing margin-left on it in order to remove it.

示例

注意:这只会将整个跨度向后移动几个像素.实际上,该空间仍然存在并且无法正确移除.

Note: this only moves the entire span a few px back. In reality, the space is still there and cannot be properly removed.

这篇关于如何删除 HTML 中字符之间的空格?填充不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆