-1
The glyphicon
is a font, so it gets text properties like color, font-size, etc... So it also accepts the property text-stroke
, with it you can put a contorne in the text, in case in the icon that is actually a character of a source calls glyphicon
.
So how the text-stroke
you put the outline, and as the color: transparent;
vc puts the color of the font transparent, leaving only the outline of the icon image.
body {
background-image: linear-gradient(to bottom, #00f 0%, #f00 100%);
}
#contato_link .glyphicon {
-webkit-text-fill-color: transparent;
color: transparent;
-webkit-text-stroke-width: 2px;
-webkit-text-stroke-color: #fff;
font-size: 50px;
}
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<nav>
<a id="contato_link" [routerLink]="['/admin']">
<span class="glyphicon glyphicon-phone-alt" aria-hidden="true"> </span>
<br />
Contato
</a>
<a [routerLink]="['/upload']">Fotos</a>
<a href="#">Endereço</a>
</nav>
OBS: Browser support you can check here, it doesn’t only work on IE. https://caniuse.com/#feat=text-Stroke and although having to prefix -Webkit- works in several browsers.
No no, what I want is to make it transparent inside and with the white edges, it has nothing to do with circle around no, the image was just illustrative
– user8465
@user8465 I think I understand now, take a look at the edition I made in the reply,
– hugocsl
face understand, it has nothing to do with circles or squares or anything, what I want is just that the icon stay the transparent color with the white edges, as shown in the second image, My God from heaven, will it be difficult to understand this, it is good to read the questions carefully before answering, for God’s sake
– user8465
@hugocsl: Making an analogy with svg I think he wants something with
{stroke: withe; fill: none}
– Augusto Vasques
@user8465 My God is so hard you express what you really need? Your question is not clear, if you do not know what is an image with fill and no fill, or can not say that you want the image without background and only with the outline I’m sorry. I answered with what I understood
– hugocsl
@Augustovasques did you understand right away that he only wanted the icon Stroke? Or only after he explained n comment above?
– hugocsl
The missing was in question the example to be given as the same icon. Switching from phone to wallet made it difficult to understand the problem due to the peculiarities of each image.
– Augusto Vasques
@Augustovasques thought only I had misunderstood.... Anyway, I gave an updated answer showing how to do, if you are interested in the technique is described, It was worth the force :). [] s
– hugocsl