How can I use meta viewport and CSS media queries to make the average 960px website look good on the iPhone and iPad?

前端 未结 4 705
失恋的感觉
失恋的感觉 2021-02-01 23:56

Question

I know there are a lot of questions on Stack Overflow about the meta viewport tag, but I can\'t find anyone asking what seems to be the most obvious and usefu

4条回答
  •  渐次进展
    2021-02-02 00:14

    I use Serban Ghita's php Mobile Detection method:

    https://github.com/serbanghita/Mobile-Detect

    ...then this php in the head tag:

    isMobile() && !$detect->isTablet()) {?>
       
    
    

    Works great.

提交回复
热议问题