How would you write media queries for multiple screen sizes?

前端 未结 5 1850
孤城傲影
孤城傲影 2021-02-01 09:08

If i want

body {font-size:18 px} for 1900 and above

body {font-size:16 px} for 1024 and 1900

body {font-size:14 px}

5条回答
  •  北荒
    北荒 (楼主)
    2021-02-01 09:51

    You could use media queries. For example your font size for 1024 to 1900 would be set like this:

    @media screen and (max-width: 1900px){
        body{font-size:16px;}
    }
    

    For a more thorough explanation see responsive web design: http://www.alistapart.com/articles/responsive-web-design/

提交回复
热议问题