删除内联元素之间的填充
我有两个包含内容的跨度标签。第一个 span 标记将保存来自客户端的内容,第二个标记的作用类似于“blipping-cursor”(我使用 JavaScript 将其“显示”样式从内联变为每 500 毫秒一次)。目前,一切都运行良好,除了第一个内容之间有一点间距(IE 中只有一点,Webkit 中有一吨(一两个空格值得)(嵌套括号获胜!))))跨度和第二跨度。
所以我的问题很简单(好吧,问题,答案可能很容易,也可能不容易),如何删除当前占据跨度一和跨度二之间的空间?
这是一个 jsFiddle: http://jsfiddle.net/DalexL/6pZB3/
如您所见,两个跨度内容之间有一个突出显示的单个空格。
如果可以的话谢谢!
I have two span tags that contain content. The first span tag will hold content from the client and the second acts like a "blipping-cursor" (I'm using JavaScript to turn its "display" style from inline to none every 500 milliseconds). Currently, everything works great except for the fact that there is a bit of spacing (just a bit in IE and a TON (one or two spaces worth) in Webkit (nested parenthesis for the win!))) between the content in the first span and the second span.
So my question is simple (well, the question, the answer may or may not be easy), how do I remove this space currently occupying the spot between span one and span two?
Here is a jsFiddle: http://jsfiddle.net/DalexL/6pZB3/
As you can see, there is a highlightable single-space in between the two spans content.
Thanks if you can!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在没有看到任何代码的情况下,我会冒险说两个跨度之间有一个换行符:
这有时会导致空格。如果你去掉它,空间就会消失:
Without seeing any code, I'm going to go out on a limb and say that you have a line break in between the two spans:
That will cause a space sometimes. If you get rid of it, the space should go away: