HTML / CSS - adjust font-size to fill parent height and width

前端 未结 5 1040
梦毁少年i
梦毁少年i 2020-12-03 11:04

I have a

element that resizes as the browser window resizes.

Inside the

I have a paragraph of text:



        
5条回答
  •  暖寄归人
    2020-12-03 11:55

    What you need is called vw. Example CSS: font-size: 80vw;. vw means viewerport width, and 80vw = 80% of the device screen width

提交回复
热议问题