简体   繁体   English

如何删除子标签前后的空格

[英]how to remove space before and after sub tag

ok so I want to remove the space between two words created by a sub word in between using css.好的,所以我想删除使用 css 之间的子词创建的两个词之间的空格。 the following two images will demonstrate what I'm trying to do perfectly.下面的两张图片将展示我正在尝试做的完美的事情。

change this to this .这个改成这个

This can be pulled off by setting the position of the sub text to absolute and setting where you want it to be.这可以通过将子文本的位置设置为绝对位置并设置您想要的位置来实现。 Ive made a plunker so you can see what i've done but it looks like this我做了一个plunker,所以你可以看到我做了什么,但它看起来像这样

<style>
p{
  font-size:2rem;
}
p > sub{
  color:green;
  position:absolute;
  top:7.5rem;
  left:4rem;
}
</style>
<p>First <sub>Middle</sub> Last</p>

http://plnkr.co/edit/5UCHcHn0PuNn1oh4aWvc http://plnkr.co/edit/5UCHcHn0​​PuNn1oh4aWvc

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM