How to write fraction value using html?

后端 未结 9 966
闹比i
闹比i 2020-11-28 08:09

I want to write fraction value such as the picture below:

\"enter

How do I wri

9条回答
  •  一向
    一向 (楼主)
    2020-11-28 08:32

    Check out the following:

    span.frac {
      display: inline-block;
      text-align: center;
      vertical-align: middle;
    }
    span.frac > sup, span.frac > sub {
      display: block;
      font: inherit;
      padding: 0 0.3em;
    }
    span.frac > sup {border-bottom: 0.08em solid;}
    span.frac > span {display: none;}

    4273.

    CodePen

提交回复
热议问题