Font scaling based on width of container

后端 未结 30 3082
面向向阳花
面向向阳花 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条回答
  •  Happy的楠姐
    2020-11-21 05:29

    Inside your CSS, try adding this at the bottom changing the 320 pixels width for wherever your design starts breaking:

        @media only screen and (max-width: 320px) {
    
            body { font-size: 1em; }
    
        }
    

    Then give the font-size in "px" or "em" as you wish.

提交回复
热议问题