Why do I have to put media queries at the bottom of the stylesheet?

前端 未结 5 827
长发绾君心
长发绾君心 2020-12-09 11:35

I am new learning responsive design. What I have noticed on my journey is that when I put media queries at the bottom of the stylesheet, everything works flawlessly in regar

5条回答
  •  南笙
    南笙 (楼主)
    2020-12-09 11:40

    Basically you are using media queries when you want to apply CSS styles depending on a device's general type (such as print vs. screen), specific characteristics (such as the width of the browser viewport, or environment (such as ambient light conditions).

    When you started designing, you generally started doing it for one device of known specifications. So you design it according to you current device and then apply it for other screen sizes.

    Hence the order goes like this: Make complete design --> Add the media query to fit for desired screen sizes at the bottom.

提交回复
热议问题