Glasses font awesome icon Usage,CSS Class Name,SVG & CSS Content Code
Glasses
font awesome icon css class name is fa-glasses
and CSS Content Code is \f530
.
Glasses
font awesome icon is part of solid icons.
Glasses
font awesome icon usage
We can display Glasses
font awesome icon using 3 different ways depending upon our requirement.
Using CSS Class Name
Using CSS Content Code
Using SVG
Glasses
font awesome icon CSS class name
To display Glasses
font awesome icon, add predefined class name i.e.,fa-glasses
(with prefix fa-
) to the i
tag.
And we need to add corresponding font awesome icon style for the Glasses
icon.
Glasses
icon has 1 icon style i.e.,solid.
We need to append icon style class fas
.
<i class='fas fa-glasses'></i>
Output:
Glasses
font awesome icon CSS Content Code
We can display Glasses
font awesome icon using it’s CSS Content Code \f530
Use the following HTML code
<li><span class='Glasses fontawesomeicon'></span>Glasses</li>
Apply CSS code
<style>
.fontawesomeicon::before {
display: inline-block;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
}
.Glasses::before {
font: var(--fa-font-solid);
content: ' \f530';
}</style>
Output:
.fontawesomeicon::before { display: inline-block; text-rendering: auto; -webkit-font-smoothing: antialiased; } .Glasses::before { font: var(--fa-font-solid); content: ' \f530'; }For the detailed tutorial visit https://www.angularjswiki.com/fontawesome/csscontentcode/
Glasses
font awesome icon SVG
Use the following icon SVG to display Glasses
font awesome icon.
<svg class='fontawesomesvg' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M118.6 80c-11.5 0-21.4 7.9-24 19.1L57 260.3c20.5-6.2 48.3-12.3 78.7-12.3c32.3 0 61.8 6.9 82.8 13.5c10.6 3.3 19.3 6.7 25.4 9.2c3.1 1.3 5.5 2.4 7.3 3.2c.9 .4 1.6 .7 2.1 1l.6 .3 .2 .1 .1 0 0 0 0 0s0 0-6.3 12.7h0l6.3-12.7c5.8 2.9 10.4 7.3 13.5 12.7h40.6c3.1-5.3 7.7-9.8 13.5-12.7l6.3 12.7h0c-6.3-12.7-6.3-12.7-6.3-12.7l0 0 0 0 .1 0 .2-.1 .6-.3c.5-.2 1.2-.6 2.1-1c1.8-.8 4.2-1.9 7.3-3.2c6.1-2.6 14.8-5.9 25.4-9.2c21-6.6 50.4-13.5 82.8-13.5c30.4 0 58.2 6.1 78.7 12.3L481.4 99.1c-2.6-11.2-12.6-19.1-24-19.1c-3.1 0-6.2 .6-9.2 1.8L416.9 94.3c-12.3 4.9-26.3-1.1-31.2-13.4s1.1-26.3 13.4-31.2l31.3-12.5c8.6-3.4 17.7-5.2 27-5.2c33.8 0 63.1 23.3 70.8 56.2l43.9 188c1.7 7.3 2.9 14.7 3.5 22.1c.3 1.9 .5 3.8 .5 5.7v6.7V352v16c0 61.9-50.1 112-112 112H419.7c-59.4 0-108.5-46.4-111.8-105.8L306.6 352H269.4l-1.2 22.2C264.9 433.6 215.8 480 156.3 480H112C50.1 480 0 429.9 0 368V352 310.7 304c0-1.9 .2-3.8 .5-5.7c.6-7.4 1.8-14.8 3.5-22.1l43.9-188C55.5 55.3 84.8 32 118.6 32c9.2 0 18.4 1.8 27 5.2l31.3 12.5c12.3 4.9 18.3 18.9 13.4 31.2s-18.9 18.3-31.2 13.4L127.8 81.8c-2.9-1.2-6-1.8-9.2-1.8zM64 325.4V368c0 26.5 21.5 48 48 48h44.3c25.5 0 46.5-19.9 47.9-45.3l2.5-45.6c-2.3-.8-4.9-1.7-7.5-2.5c-17.2-5.4-39.9-10.5-63.6-10.5c-23.7 0-46.2 5.1-63.2 10.5c-3.1 1-5.9 1.9-8.5 2.9zM512 368V325.4c-2.6-.9-5.5-1.9-8.5-2.9c-17-5.4-39.5-10.5-63.2-10.5c-23.7 0-46.4 5.1-63.6 10.5c-2.7 .8-5.2 1.7-7.5 2.5l2.5 45.6c1.4 25.4 22.5 45.3 47.9 45.3H464c26.5 0 48-21.5 48-48z"/></svg>
Use the following HTML code
<p>This <svg class='fontawesomesvg' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M118.6 80c-11.5 0-21.4 7.9-24 19.1L57 260.3c20.5-6.2 48.3-12.3 78.7-12.3c32.3 0 61.8 6.9 82.8 13.5c10.6 3.3 19.3 6.7 25.4 9.2c3.1 1.3 5.5 2.4 7.3 3.2c.9 .4 1.6 .7 2.1 1l.6 .3 .2 .1 .1 0 0 0 0 0s0 0-6.3 12.7h0l6.3-12.7c5.8 2.9 10.4 7.3 13.5 12.7h40.6c3.1-5.3 7.7-9.8 13.5-12.7l6.3 12.7h0c-6.3-12.7-6.3-12.7-6.3-12.7l0 0 0 0 .1 0 .2-.1 .6-.3c.5-.2 1.2-.6 2.1-1c1.8-.8 4.2-1.9 7.3-3.2c6.1-2.6 14.8-5.9 25.4-9.2c21-6.6 50.4-13.5 82.8-13.5c30.4 0 58.2 6.1 78.7 12.3L481.4 99.1c-2.6-11.2-12.6-19.1-24-19.1c-3.1 0-6.2 .6-9.2 1.8L416.9 94.3c-12.3 4.9-26.3-1.1-31.2-13.4s1.1-26.3 13.4-31.2l31.3-12.5c8.6-3.4 17.7-5.2 27-5.2c33.8 0 63.1 23.3 70.8 56.2l43.9 188c1.7 7.3 2.9 14.7 3.5 22.1c.3 1.9 .5 3.8 .5 5.7v6.7V352v16c0 61.9-50.1 112-112 112H419.7c-59.4 0-108.5-46.4-111.8-105.8L306.6 352H269.4l-1.2 22.2C264.9 433.6 215.8 480 156.3 480H112C50.1 480 0 429.9 0 368V352 310.7 304c0-1.9 .2-3.8 .5-5.7c.6-7.4 1.8-14.8 3.5-22.1l43.9-188C55.5 55.3 84.8 32 118.6 32c9.2 0 18.4 1.8 27 5.2l31.3 12.5c12.3 4.9 18.3 18.9 13.4 31.2s-18.9 18.3-31.2 13.4L127.8 81.8c-2.9-1.2-6-1.8-9.2-1.8zM64 325.4V368c0 26.5 21.5 48 48 48h44.3c25.5 0 46.5-19.9 47.9-45.3l2.5-45.6c-2.3-.8-4.9-1.7-7.5-2.5c-17.2-5.4-39.9-10.5-63.6-10.5c-23.7 0-46.2 5.1-63.2 10.5c-3.1 1-5.9 1.9-8.5 2.9zM512 368V325.4c-2.6-.9-5.5-1.9-8.5-2.9c-17-5.4-39.5-10.5-63.2-10.5c-23.7 0-46.4 5.1-63.6 10.5c-2.7 .8-5.2 1.7-7.5 2.5l2.5 45.6c1.4 25.4 22.5 45.3 47.9 45.3H464c26.5 0 48-21.5 48-48z"/></svg>
Glasses displayed using SVG</p>
Apply CSS code
<style>
.fontawesomesvg {width: 1em;
height: 1em;
vertical-align: -.125em;
}
</style>
Output:
.fontawesomesvg {width: 1em; height: 1em; vertical-align: -.125em; }This Glasses displayed using SVG
Change Glasses
font awesome icon size
To increase Glasses
font awesome icon size, use the fa-lg(33 % increase)
, fa-2x
, fa-3x
, fa-4x
, or fa-5x
classes along with icon class \f530.
Increase in icon size will be relative to their parent container.
<i class='fas fa-glasses fa-lg'>fa-lg</i><br/>
<i class='fas fa-glasses fa-2x'>fa-2x</i><br/>
<i class='fas fa-glasses fa-3x'>fa-3x</i><br/>
<i class='fas fa-glasses fa-4x'>fa-4x</i><br/>
<i class='fas fa-glasses fa-5x'>fa-5x</i><br/>
Output:
fa-lgfa-2x
fa-3x
fa-4x
fa-5x
Glasses
font awesome icon with Fixed Width
All the font awesome icons does not have same width.
For example Glasses
icon and home
icon may not have same height and width.
So to display two icons with fixed width and height we can use fa-fw
class.
<i style='border:1px solid;' class='fas fa-glasses fa-fw fa-3x'></i>Fixed Width<i style='border:1px solid;' class='fas fa-glasses fa-3x'></i>Normal<br/>
<i style='border:1px solid;' class='fas fa-home fa-fw fa-3x'></i>Fixed Width<i style='border:1px solid;' class='fas fa-home fa-3x'></i>Normal<br/>
Output:
Fixed WidthNormalFixed WidthNormal
Glasses
font awesome icon Border
To add border to Glasses
font awesome icon, use fa-border
class.
<i class='fas fa-glasses fa-border fa-3x'></i>
Output:
Pull Glasses
font awesome icon To the left
To pull Glasses
icon to the left of the container use fa-pull-left
class.
<div style='width: 200px;'>
<i class='fas fa-glasses fa-pull-left fa-3x'></i>
... The text after Glasses Icon will be displayed on the right side of the icon.
</div>
<div style = 'clear: both;'></div>
Output:
Pull Glasses
font awesome icon To the left
To pull Glasses
icon to the right of the container use fa-pull-right
class.
<div style='width: 200px;'>
<i class='fas fa-glasses fa-pull-right fa-3x'></i>
... The text after Glasses Icon will be displayed on the left side of the icon.
</div>
<div style = 'clear: both;'></div>
Output:
Animate Glasses
font awesome icon
To animate Glasses
font awesome icon, use fa-spin
class.
<i class='fas fa-glasses fa-spin fa-3x'></i>
Output:
Animate Glasses
font awesome icon with steps
While animating the font awesome icon,We can rotate Glasses
icon in 8 steps instead of uniform rotation.
We can use fa-pulse
icon along with fa-spin
class.
<i class='fas fa-glasses fa-spin fa-pulse fa-3x'></i>
Output:
Rotate Glasses
font awesome icon
To rotate Glasses
font awesome icon, Use fa-rotate-x
class
Where ‘x’ represents degree of rotation.
<div>
<i class='fas fa-glasses fa-3x'>R</i>normal<br/><br/>
<i class='fas fa-glasses fa-rotate-90 fa-3x'>R</i> fa-rotate-90<br/><br/>
<i class='fas fa-glasses fa-rotate-180 fa-3x'>R</i> fa-rotate-180<br/><br/>
<i class='fas fa-glasses fa-rotate-270 fa-3x'>R</i> fa-rotate-270<br/><br/>
</div>
Output:
R fa-rotate-90
R fa-rotate-180
R fa-rotate-270
Flip Glasses
font awesome icon
To flip Glasses
font awesome icon horizontally and vertically use fa-flip-horizontal
and fa-flip-vertical
classes.
<div>
<i class='fas fa-glasses fa-3x'>F</i> Normal <br>
<i class='fas fa-glasses fa-flip-horizontal fa-3x'>F</i> fa-flip-horizontal<br>
<i class='fas fa-glasses fa-flip-vertical fa-3x'>F</i> fa-flip-vertical<br>
</div>
Output:
F fa-flip-horizontal
F fa-flip-vertical
Combine Glasses
font awesome icon with other font awesome icons
In font awesome icons,using stacking we can combine multiple icons and display it as one icon.
To do that use the fa-stack
class on the parent, the fa-stack-1x
for the regularly sized icon, and fa-stack-2x
for the larger icon.
And use class fa-inverse
for an alternative icon color.
In the below example, I am displaying Glasses
font awesome icon on top of icons like fa-square
,fa-circle
and fa-ban
.
And used fa-inverse
in the second example to invert the color of the icon.
<div>
<span class='fa-stack fa-lg'>
<i class='far fa-square fa-stack-2x'></i>
<i class='fas fa-glasses fa-stack-1x'></i>
</span>
Glasses on fa-square<br>
<span class='fa-stack fa-lg'>
<i class='fas fa-circle fa-stack-2x'></i>
<i class='fas fa-glasses fa-stack-1x fa-inverse'></i>
</span>
Glasses on fa-circle<br>
<span class='fa-stack fa-lg'>
<i class='fas fa-glasses fa-stack-1x'></i>
<i class='fas fa-ban fa-stack-2x'></i>
</span>
Glasses on fa-ban
</div>
Output:
Glasses on fa-circle
Glasses on fa-ban