Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have some simple code which includes two font icons from FontAwesome.

They render like this in my browser:

Side by side example of two icons

Note that although both elements are 16px in height, the two icons are not vertically aligned, the calendar rests lower down than the

Screenshot showing gap

<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet"/>
<link href="https://pro.fontawesome.com/releases/v5.15.1/css/all.css" rel="stylesheet"/>


<p>
  <i class="fad fa-times-hexagon text-danger fa-fw"></i>
  <i class="fad fa-fw fa-calendar"></i>
</p>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

This would appear to be a problem with the glyphs defined in the font itself

calendar secondary glyph

hexagon secondary glyph


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...