How to write fraction value using html?
问题 I want to write fraction value such as the picture below: How do I write fraction value using html without using image? NOTE: I don\'t want this 1 1/2 pattern but strictly just as the pic above 回答1: Try the following: 1<sup>1</sup>⁄<sub>2</sub> This displays as: 1 1 ⁄ 2 回答2: .frac { display: inline-block; position: relative; vertical-align: middle; letter-spacing: 0.001em; text-align: center; } .frac > span { display: block; padding: 0.1em; } .frac span.bottom { border-top: thin solid black;