CSS - calc() on font-size - changing font size based on container size

前端 未结 4 1649
别跟我提以往
别跟我提以往 2021-01-17 15:34

I have a situation where I have a container element (div) that contains text. This text will sometimes be really large - not paragraph large, but it can potenti

4条回答
  •  走了就别回头了
    2021-01-17 15:52

    This is still nearly impossible in CSS only, as the size of each character in different fonts isn't known to us via CSS. There is a jQuery plugin called fitText that handles this sort of thing very nicely.

提交回复
热议问题