CSS media queries don't work in Safari

Does anyone know why media queries do not work in Safari? For instance:

body { background-color:black; } @media screen and (min-width: 1024px) and (max-width: 1300px) { body { background-color:red; } } @media screen and (max-width:860px) { body { background-color:yellow; } } @media screen and (max-width: 600px) { body { background-color:orange; } } 

This example ( http://jsfiddle.net/crUVv/show ) works fine in all browsers except Safari.

+4
source share
1 answer

use meta in head

 <!DOCTYPE html> <html lang="en-us"> <head> <meta name="viewport" content="width=device-width"> </head> <body> </body> </html> 
+1
source

Source: https://habr.com/ru/post/1494222/


All Articles