I am trying to create outlined texted using this batman font, like below:
How can I do this using CSS?
I am trying to create outlined texted using this batman font, like below:
How can I do this using CSS?
The font itself having outerline so, you just add color to text, you just add color:red;
for your outline font.
For Example:
<h1 style="font-family: myFirstFont; color:green;">FONT <span style="color:red;"> COLOR</span></h1>
Your result Here what you are looking for
You can't fill color through css3 in font
use text shadow
see this:
<html>
<head><title></title></head>
<style>
body{font-family:BatmanForeverAlternate;color:#333333;font-size:48px;text-shadow: -1px 0 #ff0000, 0 1px #ff0000, 1px 0 #ff0000, 0 -1px #ff0000;}
p span{color:#ff0000;text-shadow: -1px 0 #333333, 0 1px #333333, 1px 0 #333333, 0 -1px #333333;}
</style>
<body>
<p>T<span>A</span></p>
</body>
</html>
To set the stroke of a letter you can use text-stroke, please note this property is not supported on IE.
Alternatively you could use SVG.
h1 {
font-size: 150px;
font-family: "Arial Black", Gadget, sans-serif;
color: rgba(255, 255, 255, 0.0);
-webkit-text-stroke: 5px gray;
}
h1 > span {
-webkit-text-stroke: 5px red;
}
<h1><span>T</span>A</h1>