Media Queries 媒体查询常见设备断点

/*#region Media Query*/

/*#region SmartPhones */

/* SmartPhones */
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {}
/* Landscape */
@media only screen and (min-width : 321px) {}
/* Portrait */
@media only screen and (max-width : 320px) {}

/*#endregion */

/*#region Phones and Handhelds */

/* ----------- iPhone 4 and 4S ----------- */

/* Portrait and Landscape */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {}

/* Portrait */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait) {}

/* Landscape */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: landscape) {}

/* ----------- iPhone 5 and 5S ----------- */

/* Portrait and Landscape */
@media only screen and (min-device-width: 320px) and (max-device-width: 568px) and (-webkit-min-device-pixel-ratio: 2) {}

/* Portrait */
@media only screen and (min-device-width: 320px) and (max-device-width: 568px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait) {}

/* Landscape */
@media only screen and (min-device-width: 320px) and (max-device-width: 568px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: landscape) {}

/* ----------- iPhone 6 ----------- */

/* Portrait and Landscape */
@media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (-webkit-min-device-pixel-ratio: 2) {}

/* Portrait */
@media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait) {}

/* Landscape */
@media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: landscape) {}

/* ----------- iPhone 6+ ----------- */

/* Portrait and Landscape */
@media only screen and (min-device-width: 414px) and (max-device-width: 736px) and (-webkit-min-device-pixel-ratio: 3) {}

/* Portrait */
@media only screen and (min-device-width: 414px) and (max-device-width: 736px) and (-webkit-min-device-pixel-ratio: 3) and (orientation: portrait) {}

/* Landscape */
@media only screen and (min-device-width: 414px) and (max-device-width: 736px) and (-webkit-min-device-pixel-ratio: 3) and (orientation: landscape) {}

/* ----------- Galaxy S3 ----------- */

/* Portrait and Landscape */
@media screen and (device-width: 320px) and (device-height: 640px) and (-webkit-device-pixel-ratio: 2) {}

/* Portrait */
@media screen and (device-width: 320px) and (device-height: 640px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait) {}

/* Landscape */
@media screen and (device-width: 320px) and (device-height: 640px) and (-webkit-device-pixel-ratio: 2) and (orientation: landscape) {}

/* ----------- HTC One ----------- */

/* Portrait and Landscape */
@media screen and (device-width: 360px) and (device-height: 640px) and (-webkit-device-pixel-ratio: 3) {}

/* Portrait */
@media screen and (device-width: 360px) and (device-height: 640px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait) {}

/* Landscape */
@media screen and (device-width: 360px) and (device-height: 640px) and (-webkit-device-pixel-ratio: 3) and (orientation: landscape) {}

/*#endregion */

/*#region Tablets */

/* ----------- iPad mini ----------- */

/* Portrait and Landscape */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 1) {}

/* Portrait */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 1) {}

/* Landscape */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 1) {}

/* ----------- iPad 1 and 2 ----------- */
/* Portrait and Landscape */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 1) {}

/* Portrait */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 1) {}

/* Landscape */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 1) {}

/* ----------- iPad 3 and 4 ----------- */
/* Portrait and Landscape */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) {}

/* Portrait */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2) {}

/* Landscape */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 2) {}

/* ----------- Galaxy Tab 10.1 ----------- */

/* Portrait and Landscape */
@media (min-device-width: 800px) and (max-device-width: 1280px) {}

/* Portrait */
@media (max-device-width: 800px) and (orientation: portrait) {}

/* Landscape */
@media (max-device-width: 1280px) and (orientation: landscape) {}

/* ----------- Asus Nexus 7 ----------- */

/* Portrait and Landscape */
@media screen and (device-width: 601px) and (device-height: 906px) and (-webkit-min-device-pixel-ratio: 1.331) and (-webkit-max-device-pixel-ratio: 1.332) {}

/* Portrait */
@media screen and (device-width: 601px) and (device-height: 906px) and (-webkit-min-device-pixel-ratio: 1.331) and (-webkit-max-device-pixel-ratio: 1.332) and (orientation: portrait) {}

/* Landscape */
@media screen and (device-width: 601px) and (device-height: 906px) and (-webkit-min-device-pixel-ratio: 1.331) and (-webkit-max-device-pixel-ratio: 1.332) and (orientation: landscape) {}

/* ----------- Kindle Fire HD 7" ----------- */

/* Portrait and Landscape */
@media only screen and (min-device-width: 800px) and (max-device-width: 1280px) and (-webkit-min-device-pixel-ratio: 1.5) {}

/* Portrait */
@media only screen and (min-device-width: 800px) and (max-device-width: 1280px) and (-webkit-min-device-pixel-ratio: 1.5) and (orientation: portrait) {}

/* Landscape */
@media only screen and (min-device-width: 800px) and (max-device-width: 1280px) and (-webkit-min-device-pixel-ratio: 1.5) and (orientation: landscape) {}

/* ----------- Kindle Fire HD 8.9" ----------- */

/* Portrait and Landscape */
@media only screen and (min-device-width: 1200px) and (max-device-width: 1600px) and (-webkit-min-device-pixel-ratio: 1.5) {}

/* Portrait */
@media only screen and (min-device-width: 1200px) and (max-device-width: 1600px) and (-webkit-min-device-pixel-ratio: 1.5) and (orientation: portrait) {}

/* Landscape */
@media only screen and (min-device-width: 1200px) and (max-device-width: 1600px) and (-webkit-min-device-pixel-ratio: 1.5) and (orientation: landscape) {}

/*#endregion */

/*#region Laptops  */

/* ----------- Non-Retina Screens ----------- */
@media screen and (min-device-width: 1200px) and (max-device-width: 1600px) and (-webkit-min-device-pixel-ratio: 1) {}

/* ----------- Retina Screens ----------- */
@media screen and (min-device-width: 1200px) and (max-device-width: 1600px) and (-webkit-min-device-pixel-ratio: 2) and (min-resolution: 192dpi) {}

/*#endregion */

/*#region Wearables */

/* ----------- Apple Watch ----------- */
@media (max-device-width: 42mm) and (min-device-width: 38mm) {}

/* ----------- Moto 360 Watch ----------- */
@media (max-device-width: 218px) and (max-device-height: 281px) {}

/*#endregion */

/* Desktops & Laptops */
@media only screen and (min-width : 1224px) {}

/* Large Screens */
@media only screen and (min-width : 1824px) {}

/* Windows 8 SnapMode */
@media screen and (max-width:400px) {
    @-ms-viewport { width: 320px; }
}
/*#endregion */

/*#region Bootstrap Media Query */

/* 超小屏幕(手机,小于 768px) */

/* 小屏幕(平板,大于等于 768px) */
@media (min-width: 768px) {}

/* 中等屏幕(桌面显示器,大于等于 992px) */
@media (min-width: 992px) {}

/* 大屏幕(大桌面显示器,大于等于 1200px) */
@media (min-width: 1200px) {}

/* screen-xs-max */
@media (max-width: 767px) {}

/* screen-sm-min & screen-sm-max */
@media (min-width: 768px) and (max-width: 991px) {}

/* screen-md-min & screen-md-max */
@media (min-width: 992px) and (max-width: 1199px) {}

/* screen-lg-min */
@media (min-width: 1200px) {}

/*#endregion */

时间: 2024-10-31 03:57:53

Media Queries 媒体查询常见设备断点的相关文章

Media Queries ---- 媒体查询 @media

随着科学技术不断的向前发展,网页的浏览终端越来越多样化,用户可以通过:宽屏电视.台式电脑.笔记本电脑.平板电脑和智能手机来 访问你的网站.尽管你无法保证一个网站在不同屏幕尺寸和不同设备上看起来完全一模一样,但至少要让你的Web页面能适配用户的终端,让他更好的呈现在你的 用户面前.在本节中,将会学到如何使用CSS3中的Media Queries模块来让一个页面适应不同的终端(或屏幕尺寸),从而让你的页面让用户有一个更好的体验. Media Queries Media Queries是CSS3新增加

Media Queries媒体查询详解

Media Queries直译过来就是“媒体查询”,在我们平时的Web页面中head部分常看到这样的一段代码: <link href=”css/reset.css” rel=”stylesheet” type=”text/css” media=”screen” /><link href=”css/style.css” rel=”stylesheet” type=”text/css” media=”all” /><link href=”css/print.css” rel=”s

media queries 媒体查询使用

media queries 翻译过来就是媒体查询,media 指的媒体类型.那么有哪些类型呢,常用的有 screen(屏幕).打印(print),个人理解就是它所在的不同终端. 常用的用法:1,<link rel="stylesheet" media="screen and (max-width:600px)" href="small.css" />根据符合的条件,调用相应的样式 2,在css中直接使用 媒体特性(判断条件)Media

css3之Media Queries 媒体查询

一.初步了解 Media Queries是CSS3新增加的一个模块功能,其最大的特点就是通过css3来查询媒体,然后调用对应的样式. 了解Media Queries之前需要了解媒体类型以及媒体特性: 可以通过媒体类型(Media Type)对不同的设备指定不同的样式,W3C总共列出了10种媒体类型 二.媒体类型的引用方法有3种 link方法 就是在<link>标签引用样式的时候,通过link标签中的media属性来指定不同的媒体类型.如下: <link rel="stylesh

CSS3 媒体查询移动设备尺寸 Media Queries for Standard Devices (包括 苹果手表 apple watch)

/* ----------- iPhone 4 and 4S ----------- */ /* Portrait and Landscape */ @media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) { } /* Portrait */ @media only screen and (min-device-wi

media query(媒体查询)和media type(媒体类型)

media type(媒体类型)是css 2中的一个非常有用的属性,通过media type我们可以对不同的设备指定特定的样式,从而实现更丰富的界面.media query(媒体查询)是对media type的一种增强,是CSS 3的重要内容之一.随着移动互联网的发展,media query开始得到大家的重视. media type 让我们先了解一下media type,其实这个大家会比较熟悉一点,我们通常会用到的media type会是all 和screen,然后是print,一些网站会专门通

Css3的Media Query 媒体查询 方法总结—让您的网站兼容手机

最近几年,大屏幕手机和ipad等移动设备的流行,使你的网页兼容移动设备已成为一种流行!移动设备的屏幕大小是五花八门,各式各样!要想很好的兼容移动设备,Css3的media技术是功不可没. 我的博客,应用了CSS3的media技术,使其在手机等移动设备上面也可以查看.当然,只凭css3的media技术,做好手机网站是远远不够的,手机网站注意事项和总结,后面会陆续出一些文章,欢迎持续关注! 好了,废话少说,下面进入正题: 一.Css3的Media Queries 翻译成中文是“媒体查询”,有如下几种

Media Queries——媒体类型

媒体类型(Media Type)在CSS2中是一个常见的属性,也是一个非常有用的属性,可以通过媒体类型对不同的设备指定不同的样式. 在CSS2中常碰到的就是all(全部).screen(屏幕).print(页面打印或打印预览模式),也是最常见的三种媒体类型. 媒体类型的引用方法也有多种,常见的有:link标签.@import和CSS3新增的@media几种: link方法 通过link标签中的media属性来指定不同的媒体类型 <link rel="stylesheet" typ

移动设备上的媒体查询 CSS media queries for mobile device

现在试图解决android平板的屏幕分辨率问题,目前主要想到的办法是采用响应式设计和媒体查询,发现无论使用那种方式,工作量都很大,调试都困难,悲催啊. CSS的媒体查询虽然在传统的互联网页面可能发挥的余地不是很大,但是自从苹果和安卓的风靡之后,移动平台上的web开发变得越来越流行了,同时CSS的媒体查询可谓派上了大用场了. 以下为翻译内容,原文来自这里 非常棒的一篇文章 关于CSS media queries想了解更多,参看这里 如何使用Media Queries媒体查询: 媒体查询就像是一个C