Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/66.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 使用媒体查询的正确方法是什么_Css - Fatal编程技术网

Css 使用媒体查询的正确方法是什么

Css 使用媒体查询的正确方法是什么,css,Css,使用媒体查询的正确方法是什么 这是一种方法吗 (一) 或方法 B.) 你的两个例子都是有效的,但它们是不同的 @media(最大宽度:992px){屏幕比992px窄 @媒体(最小宽度:442px)和(最大宽度:992px){屏幕比442px宽,和比992px窄。为什么其中一个可能不正确? @media (max-width: 992px){ something here } @media (min-width: 442px) and (max-width: 992px)

使用媒体查询的正确方法是什么

这是一种方法吗

(一) 或方法

B.)
你的两个例子都是有效的,但它们是不同的

@media(最大宽度:992px){
屏幕比992px窄


@媒体(最小宽度:442px)和(最大宽度:992px){
屏幕比442px宽,比992px窄。

为什么其中一个可能不正确?
@media (max-width: 992px){
  something here
} 
@media (min-width: 442px) and (max-width: 992px)