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

[css] 第46天 说说你对媒体查询的理解 #174

Open
haizhilin2013 opened this issue May 31, 2019 · 7 comments
Open

[css] 第46天 说说你对媒体查询的理解 #174

haizhilin2013 opened this issue May 31, 2019 · 7 comments
Labels
css css

Comments

@haizhilin2013
Copy link
Collaborator

第46天 说说你对媒体查询的理解

@haizhilin2013 haizhilin2013 added the css css label May 31, 2019
@rocky-191
Copy link

当年做响应式布局的时候用过媒介查询,media query。包括现在有的时候为了兼容也会用到一些,查找对应范围使用不同的样式

@wenyejie
Copy link

wenyejie commented Jun 3, 2019

为了适应不同的设备终端

@dangjian
Copy link

@blueRoach
Copy link

是用来适配各个尺寸设备的一个手段
最好还是写两套比较好

@maxthonl
Copy link

媒体查询可不只是为了适应终端尺寸的,比如你做了一个网页看起来很漂亮,手机电脑平板都没啥大问题,但是如果你需要打印出来的时候,你会发现布局好像不是那么回事了,而且有时候你希望的是我打印的时候是不需要打印一些只需要体现在网页上的元素,这些media query都可以解决的,例如:

@media print{
    .site-footer-credits{ display: none;}
    .noprint {display: none;}
    .page-header {text-align: left}
}

而这些,其实很多网页做的都不尽如人意

@MrZ2019
Copy link

MrZ2019 commented Nov 12, 2020

当年做响应式布局的时候用过媒介查询,media query。包括现在有的时候为了兼容也会用到一些,查找对应范围使用不同的样式

@zxcdsaqwe123
Copy link

结合bootstrap使用,根据不同的屏宽设置不同的样式

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css css
Projects
None yet
Development

No branches or pull requests

8 participants