如何删除HTML中字符之间的空格?填充无效 [英] How can I remove the space between a character in HTML? Padding doesn't work
本文介绍了如何删除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.
Example
注意:这只会将整个范围向后移几个px.实际上,该空间仍然存在,无法正确删除.
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屋!
查看全文