1. /* 判断ipad */
  2. @media only screen
  3. and (min-device-width : 768px)
  4. and (max-device-width : 1024px){
  5. /* style */
  6. }

  1. /* ipad横屏 */
  2. @media only screen
  3. and (min-device-width : 768px)
  4. and (max-device-width : 1024px)
  5. and (orientation : landscape){
  6. /* style */
  7. }

  1. /* ipad竖屏 */
  2. @media only screen
  3. and (min-device-width : 768px)
  4. and (max-device-width : 1024px)
  5. and (orientation : portrait){
  6. /* style */
  7. }

  1. /* 判断iphone5 *//* 横屏竖屏判断方法与ipad一样 */
  2. @media only screen
  3. and (min-device-width : 320px)
  4. and (max-device-width : 568px){
  5. /* style */
  6. }

  1. /* 判断iphone4-iphone4s *//* 横屏竖屏判断方法与ipad一样 */
  2. @media only screen
  3. and (min-device-width : 320px)
  4. and (max-device-width : 480px){
  5. /* style */
  6. }

  1. /* iphone5分辨率 */
  2. screen Width = 320px (css像素)
  3. screen Height = 568px (css像素)
  4. screen Width = 640px (实际像素)
  5. screen Height = 1136px (实际像素)
  6. Device-pixel-ratio:2

  1. /* iphone4-iphone4s分辨率 */
  2. screen Width = 320px (css像素)
  3. screen Height = 480px (css像素)
  4. screen Width = 640px (实际像素)
  5. screen Height = 960px (实际像素)
  6. Device-pixel-ratio:2

媒体查询判断ipad与iPhone各版本i的更多相关文章

  1. 媒体查询判断ipad和iPhone各版本

    /* 判断ipad */ @media only screen and (min-device-width : 768px) and (max-device-width : 1024px){ /* s ...

  2. JQuery 判断IPad、IPhone、Android是横屏还是竖屏(Window.Orientation实现)

    在ipad.iphone网页开发中,我们很可能需要判断是横屏或者竖屏.下面就来介绍如何用 jQuery 判断iPad.iPhone.Android是横屏还是竖屏的方法. 代码如下: function ...

  3. 基于jQuery的判断iPad、iPhone、Android是横屏还是竖屏的代码

    在ipad.iphone网页开发中,我们很可能需要判断是横屏或者竖屏.下面就来介绍如何用 jQuery 判断iPad.iPhone.Android是横屏还是竖屏的方法 其实主要是通过window.or ...

  4. 基于jQuery的判断iPad、iPhone、Android是横屏还是竖屏

    function orient() {if (window.orientation == 90 || window.orientation == -90) {//ipad.iphone竖屏:Andri ...

  5. [JS代码]如何判断ipad或者iphone是否为横屏或者竖屏 - portrait或者landscape

    //判断横屏或者竖屏 function orient() { //alert('gete'); if (window.orientation == 0 || window.orientation == ...

  6. 运用CSS3媒体查询判断iPhoneX、iPhoneXR、iPhoneXS MAX及横竖屏

    //iphoneX.iphoneXs @media only screen and (device-width: 375px) and (device-height: 812px) and (-web ...

  7. css3媒体查询判断移动设备横竖屏

    /* 设备竖屏时调用该段css代码 */ @media all and (orientation : portrait){ body{   background-color:blue;  } } /* ...

  8. 媒体查询ipad,pc端

    媒体查询 /* 判断ipad */ @media only screen and (min-device-width : 768px) and (max-device-width : 1024px){ ...

  9. 媒体查询(pc端,移动端不同布局)

    媒体查询语法: 1.内联写法:and之后必须有空格@media screen and (min-width:960px //判断浏览器大小条件){body{background:red} //常规的样 ...

随机推荐

  1. Proofs without Words:Exercises in Visual Thinking(v.1 and v.2)

    下面是手画的和拍的一些图片,出自标题中的那两本书,在图书馆草草浏览了半个小时,就把一眼能看出来的摘到这里了,再复杂一些的感觉违背了无字证明的初衷了,就没有摘录: 勾股定理: 希波克拉底定理: 无限步三 ...

  2. CsvHelper

    写66666行两个数字 用CsvHelper里的ExcelSerializer 400ms SaveAs 200ms 共600ms 直接用StreamWriter 150ms 行数可以超过65536 ...

  3. ZOJ 3781 Paint the Grid Reloaded(BFS)

    题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3781 Leo has a grid with N rows an ...

  4. mfc ui库

    引用:http://blog.csdn.net/weiqubo/article/details/6783717 Xtrme toolkit,BCGControlBar,SkinMagic,AppFac ...

  5. SQL2005中的事务与锁定(七) - 转载

    ------------------------------------------------------------------------ -- Author : HappyFlyStone - ...

  6. Oracle常用日期函数

    常用的时间格式掩码如下:掩码元素       含义YYYY           四位数年份 (如:2005)     yearYY             二位数年份(如  05) Q         ...

  7. PHP 匹配一个汉字

    使用preg_match 必须使用u flag 这个修饰符添加的额外的功能,与Perl的PCRE不兼容. Pattern和字符串均为UTF-8编码. 从PHP 4.1.0 or greater on ...

  8. node.js报错总结

    1. Error: EISDIR, read 这个报错是目标不应该是文件夹,而是其他类型,本错误出现在使用fs.createReadStream()里参数传递了个文件夹,但是应该传递个文件. 参考地址 ...

  9. SUDTOJ 3323园艺问题 (线段树)

    园艺问题 Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^ 题目描述 本巨养了一盆双色茉莉.这种花有一种特点:第i朵花在第Di天盛开,刚开时是紫色的 ...

  10. Unity在编辑器状态下清空控制台信息

    public static void ClearConsole() { var assembly = System.Reflection.Assembly.GetAssembly(typeof(Uni ...