问题描述:

@media only screen and (min-width: 480px) and (max-width: 767px) {

}

Here is my media query how to fix it. how to set for safari web browser.

网友答案:

Media queries aren't made for browser detection. Use javascript instead, for example:

if (navigator.userAgent.search("Safari") >= 0 && navigator.userAgent.search("Chrome") < 0) 
{
   alert("Browser is Safari");          
}

More can be found here

网友答案:

Syntax is the same for all browsers.

So @media only screen and (min-width: 480px) and (max-width: 767px) { } will be fine for Safari

相关阅读:
Top