Change font size depending on resolution

后端 未结 5 1113
粉色の甜心
粉色の甜心 2021-01-30 23:57

I\'m developing a Web page that uses different sizes for its different paragraphs, h... and so on. I\'m using em sizes: font-size: 2em;, as an example. But when I

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-31 00:58

    You can either use font sizes (em or pt) relative to the screen resolution as lanzz pointed out. Or, you can also use media queries in your css file as per "http://www.w3.org/TR/css3-mediaqueries/#width"

    @media screen and (min-width: 400px) and (max-width: 700px) { … }
    

    you can set any min and max width.

提交回复
热议问题