css - Use font-size to specify small decimal changes -
i want fit text inside box of specific width. therefore want calculate font size accurately. find browsers inconsistent in support of granularity in font sizes.
the code below demonstrates:
<div style="font-size: 100%;">hello</div> <div style="font-size: 101%;">hello</div> <div style="font-size: 102%;">hello</div> <div style="font-size: 103%;">hello</div> <div style="font-size: 104%;">hello</div> <div style="font-size: 105%;">hello</div> <div style="font-size: 106%;">hello</div> <div style="font-size: 1em;">hello</div> <div style="font-size: 1.01em;">hello</div> <div style="font-size: 1.02em;">hello</div> <div style="font-size: 1.03em;">hello</div> <div style="font-size: 1.04em;">hello</div> <div style="font-size: 1.05em;">hello</div> <div style="font-size: 1.06em;">hello</div> <div style="font-size: 16.1px;">hello</div> <div style="font-size: 16.2px;">hello</div> <div style="font-size: 16.3px;">hello</div> <div style="font-size: 16.4px;">hello</div> <div style="font-size: 16.5px;">hello</div> <div style="font-size: 16.6px;">hello</div>
in lot of browsers there no gradual increase of font size, rather, jumps 1 size another. know this?
thanks!
Comments
Post a Comment