The min/max-width media query doesn't make grammatical sense

前端 未结 3 1351
滥情空心
滥情空心 2021-02-04 10:30

I\'m finding the concept of the (min-width/max-width) media query a bit confusing.

Naturally if I was to design a media query I would want to say (in pseudo-code)....

3条回答
  •  梦谈多话
    2021-02-04 11:33

    The confusion here is that there is both a min-width CSS property and media query with the same name:

    @media (min-width: 420px) {...} /* This is read-only and is set to screen size */
    
    .element { min-width: 420px; ...} /* This is setting a property of the selected element */
    

提交回复
热议问题