I have the following HTML and CSS:
body { background-color: gray; }
h1 {
color: white;
font-size: 2.5em;
}
<h1>WHAT CARRER SHOULD YOU HAVE ?</h1>
Which renders like this:
I want to add a stroke around it, that means a black border around these text.
I Googled and found -webkit-text-stroke
, and came up with:
body { background-color: gray; }
h1 {
color: white;
font-size: 2.5em;
-webkit-text-stroke: 2px black;
}
<h1>WHAT CARRER SHOULD YOU HAVE ?</h1>
However, the effect is not what I want:
As you can see, it seems that the stroke is added inside the text, which make the text looks too thin for me.
How can I make the stroke outside the text?
Fiddle: http://jsfiddle.net/jpjbk1z7/
PS: only webkit support is needed