Repair line spacing problems when using sub and sup of

sub and sup elements will increase slightly higher row.

Fortunately, with a little CSS you can fix this problem.

From Nicolas Gallagher and Jonathan Neal 's normalize.css ( http://necolas.github.com/ normalize.css / ).

They borrowed https://gist.github.com/413930 in the code and removed the comments.

Above the GitHub link contained in this paragraph CSS explained in detail interested can go take a look.

normalize.css recommended to download the file. The document can help establish a unified standard style sheet a cross-browser, the documentation is very thorough.

 

1  / * 
2  * sup and sub prevent impact line-height in all browsers
 . 3  * gist.github.com/413930
 . 4  * / 
. 5  sub, sup {
 . 6              font-size : 75% ;
 . 7              line-height : 0 ;
 . 8              position : relative ;
 . 9              Vertical-align = left : Baseline ;
 10 }
 . 11  SUP {     Top : -0.5em ;}
 12 is  Sub {     bottom :-0.25em ; }

 

Guess you like

Origin www.cnblogs.com/Charons/p/11130071.html