一、HTML中:
如字符串"21st" 想要把st 设置为上标,在html标签中是21<sup>st</sup>
二、C#编辑器中
你可以使用 unicode super/subscripts,如:
var o2 = "O₂"; // or "O\x2082" or"O\u2028"
var unit2 = "unit²"; // or "unit\xB2" or"unit\u00B2" or"unit\x00B2"
var m-1 = "m-1"; // m负1次方 "m\u207B\u00B9" -号就是:u207B 先看横坐标207,在看竖坐标B,加在一起。(Unicode characters)
请参考以下网址中的表格:https://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts
The most common superscript digits (1, 2, and 3) were in ISO-8859-1 and were therefore carried over into those positions in the Latin-1 range of Unicode. The rest were placed in a dedicated section of Unicode at U+2070 to U+209F. The two tables below show these characters. Each superscript or subscript character is preceded by a normal x to show the subscripting/superscripting. The table on the left contains the actual Unicode characters; the one on the right contains the equivalents using HTML markup for the subscript or superscript. Gray cells are reserved for future use, white cells are other characters from Latin-1.
你也可以直接复制里面的字符在程序中修改。
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E |