Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【每日前端】@media 媒体查询 #7

Open
jctang1202 opened this issue Oct 5, 2017 · 0 comments
Open

【每日前端】@media 媒体查询 #7

jctang1202 opened this issue Oct 5, 2017 · 0 comments
Labels

Comments

@jctang1202
Copy link
Owner

jctang1202 commented Oct 5, 2017

@media

@media not|only mediatype and (media feature) {
    CSS-Code;
}
<link rel="stylesheet" media="mediatype and|not|only (media feature)" href="mystylesheet.css">

https://developer.mozilla.org/zh-CN/docs/Web/Guide/CSS/Media_queries
https://www.w3schools.com/cssref/css3_pr_mediaquery.asp

Bootstrap 3

Bootstrap 中响应式设计:

/* 超小屏幕(手机,小于 768px) */
/* 没有任何媒体查询相关的代码,因为这在 Bootstrap 中是默认的 */

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

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

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

Bootstrap 2

/* 大屏幕 */
@media (min-width: 1200px) { ... }
 
/* 平板电脑和小屏电脑之间的分辨率 */
@media (min-width: 768px) and (max-width: 979px) { ... }
 
/* 横向放置的手机和竖向放置的平板之间的分辨率 */
@media (max-width: 767px) { ... }
 
/* 横向放置的手机及分辨率更小的设备 */
@media (max-width: 480px) { ... }
@jctang1202 jctang1202 added the CSS label Oct 5, 2017
@jctang1202 jctang1202 changed the title 【每日前端】@media 媒体查询 【每日前端】@media 媒体查询 / float Oct 5, 2017
@jctang1202 jctang1202 changed the title 【每日前端】@media 媒体查询 / float 【每日前端】@media 媒体查询 Oct 5, 2017
@jctang1202 jctang1202 changed the title 【每日前端】@media 媒体查询 @media 媒体查询 Oct 23, 2017
@jctang1202 jctang1202 changed the title @media 媒体查询 【每日前端】@media 媒体查询 Nov 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant