Font scaling based on width of container

后端 未结 30 3076
面向向阳花
面向向阳花 2020-11-21 04:35

I\'m having a hard time getting my head around font scaling.

I currently have a website with a body font-size of 100%. 100% of what though? This seems t

30条回答
  •  庸人自扰
    2020-11-21 05:18

    100% is relative to the base font size, which, if you haven't set it, would be the browser's user-agent default.

    To get the effect you're after, I would use a piece of JavaScript code to adjust the base font size relative to the window dimensions.

提交回复
热议问题