how do i include css based on screen size of the device

后端 未结 4 1957
有刺的猬
有刺的猬 2020-12-18 11:29

How do i include css based on the screen size of the devices for viewing web pages?

What i have in mind is that i will only include one css inside a page and inside

4条回答
  •  伪装坚强ぢ
    2020-12-18 12:05

    You can either load in another css file, (device.css) or just add it to the bottom of your css. Media queries control what css is used at which pixel width.

    @media (max-width: 600px) { 
    /* Insert Code Here */
    }
    

    will target anything under 600px

提交回复
热议问题