删除链接和文本之间的空格和下划线 [英] Remove space and underscore between link and text

查看:108
本文介绍了删除链接和文本之间的空格和下划线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经剪切了,我想删除的链接和即将到来的文本之间的空间,但我不能想象我们的方法。我已尝试使用 padding margin ,但没有效果。

I've this snipped for which I want to remove the space between the link and the upcoming text, but I can't figure our how to do it. I've tried using padding and margin, but nothing works.

HTML:

A <a href="#" style="letter-spacing: 1em;">link</a>. Some text.

输出:

以下是一个示例: http://codepen.io/anon/pen/gPQVXx

推荐答案

这个答案已经被接受了,我不建议使用它。它在一些浏览器中断,不会与屏幕阅读器兼容。除此之外,只是翻转字母也是不好的做法。我创建了这个答案来展示一些可能性,而不是一个好的解决方案

这里是

它需要一些额外的努力,但它的工作没有使用负边距或额外的html。

It does require some extra effort, but it works without the use of negative margins or extra html.

你基本上必须交换所有的字母,你很好去!

You basically have to swap all the letters around, and you're good to go!

这是因为使用了两个东西。 letter-direction :第一个字母

This works because of the use of two things. letter-direction and :first-letter.

a{
  display: inline-block;
  letter-spacing: 1em;
  direction: rtl;
  unicode-bidi: bidi-override;
}

a:first-letter{
  letter-spacing: 0;
}

使用 last-letter selector:)

This would've been much easier with a :last-letterselector :)

希望这有助于

这篇关于删除链接和文本之间的空格和下划线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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