I want to add a border to glyphicon font. For example, glyphicon-heart
that has a red border and same color as the background. How can I do this?
border-color: 'red'
didn't do the job. no border will be displayed.
I want to add a border to glyphicon font. For example, glyphicon-heart
that has a red border and same color as the background. How can I do this?
border-color: 'red'
didn't do the job. no border will be displayed.
Basically the glyphicon icons are fonts and you can change the color of them just with the css
color
property. So, changing the color of the font, you will change the background. Now, fonts have noborder-color
property, but you can simulate it usingtext-shadow
http://jsfiddle.net/9suc171t/1/
You could create two icons, one smaller than the other, and place the bigger one underneath. This could be a way:
CSS
Here a Demo