Responsive font-size/weight

后端 未结 4 894
轻奢々
轻奢々 2021-02-04 21:35

I can make my images/divs responsive by using percentages.

How can I make the font-size responsive to different screen sizes?

4条回答
  •  -上瘾入骨i
    2021-02-04 22:13

    Depending on the array of browsers you have to support, CSS3 Viewport-percentage lengths might be a good solution:

    http://css-tricks.com/viewport-sized-typography/

    http://dev.w3.org/csswg/css-values/#viewport-relative-lengths

    I decided against this approach since it is only supported on iOS6 and not Android, and my project is a tablet & smartphone mobile site.

提交回复
热议问题