Center text character ☢ vertically and horizontally within a circle (CSS)

后端 未结 4 492
无人及你
无人及你 2021-01-23 03:30

I am trying to center this text character ☢ within a circle. (☢)

While IE 10 displays the text vertically and horizontally centered, both Chrome and Firefox r

4条回答
  •  萌比男神i
    2021-01-23 04:10

    You've done everything correctly with your flexbox CSS.

    The issue appears to be with line-height. You're using an html entity as text and it looks like .tl-icon is inheriting a value for line-height that doesn't work well.

    Try adjusting your line-height, and using a unitless value for it. This way the line-height will compute to whatever the font size is for the interior element.

    .tl-icon {
        line-height:.9;
    }
    

提交回复
热议问题