How can I overlay a number on top of a FontAwesome glyph?

后端 未结 4 2038
失恋的感觉
失恋的感觉 2021-01-31 03:52

How can I overlay a number between 0 and 99 in the middle of \'icon-star-empty\'?

4条回答
  •  野性不改
    2021-01-31 04:06

    You css should look something like:

    .contain-i-e-s,.icon-empty-star,.text-i-e-s{
      height:100px; width:100px;
    }
    .contain-i-e-s{
      position:relative;
    }
    .text-i-e-s{
      text-align:center; position:absolute;
    }
    

    Your HTML might look like:

    99

提交回复
热议问题