任何知道如何制作点 0 的 CSS 大师?我有一个想法,如这里描述的那样,结合白色正斜杠和反斜杠进行白色删除,但也许有更好的方法。
问问题
342 次
3 回答
2
使用带点零的字体。您可以使用@font-face
包含一个字体,您可以保证将有一个虚线零。
于 2013-04-28T00:59:20.973 回答
1
Option 1. Position a bullet over it:
<div>HELL<span class="dottedO">O<span>•</span></span> WORLD</div>
CSS:
.dottedO {
display: inline-block;
overflow: auto;
position: relative;
}
.dottedO span {
display: block;
position: absolute;
top: 0px;
left: 0px;
width: 100%;
text-align: center;
}
Option 2: Using the unicode Bilabial click character (ʘ):
<div>ʘ</div>
JSBIN: http://jsbin.com/ewufod/1
Note the above two solutions may cause issues with screen readers, search engines, etc as you're adding a non-standard character to the mix.
Option 3: Background image
Wrap the 'O' in a span, set it to display: inline-block
and give the span a background image of a dot. Drawback: that won't print.
Option 4: Use a font that already has this style (embed a web font).
于 2013-04-28T01:08:55.103 回答
0
于 2013-04-28T01:00:19.330 回答