26

如何在仅使用 CSS 垂直居中的链接之间制作点?这是可能的,但我不知道该怎么做。

预期的:

Facebook 内联列表:不同、评论、分享、1413、70、76,大约一分钟前

HTML

<label><a href="#">Like</a></label>
<label><a href="#">Comment</a></label>
<label><a href="#">Share</a></label>
<label><span>1 hour ago</span></label>​

CSS

a{ 
    vertical-align: middle;
}

label:not(:last-child):after{
    content: " . ";
}

不工作的例子:http: //jsfiddle.net/4ZFMm/

谢谢!

4

2 回答 2

57
于 2012-10-25T03:22:01.527 回答
2

Somehow these got screwed up on the live server, although they worked locally, here's what worked for me, maybe it'll help someone else:

.element:before {
    content: "\2022";
}
于 2016-12-01T15:51:15.607 回答