Is it possible to create a double outline for number how you see in below picture (I mean the green and white outline)
Any idea?
Is it possible to create a double outline for number how you see in below picture (I mean the green and white outline)
Any idea?
You can play with text-shadow. It looks not cool, but I think this is all you can do with css.
Original article on CSSTricks.
body {
background-color: green;
}
span {
font-size: 70px;
font-family: Arial;
font-weight: bold;
color: block;
text-shadow:
-2px -2px 0 green,
2px -2px 0 green,
-2px 2px 0 green,
2px 2px 0 green,
-3px -3px 0 white,
3px -3px 0 white,
-3px 3px 0 white,
3px 3px 0 white;
}
<span>1</span>
<span>2</span>
<span>3</span>
<span>4</span>
<span>A</span>
<span>B</span>
Depending on the browsers you need to support, it's not the exact same effect, but you could achieve something similar with a combination of text-shadow and -webkit-text-stroke.
text-shadow: 4px 4px 0 green;
-webkit-text-stroke: 2px white;
https://jsfiddle.net/agentfitz/rs27av43/4/
Here is another (perhaps better) option using ::before
and custom data attributes
- props to the Code Carnivore for this intelligent solution)