-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Labels
css
css
Comments
当年做响应式布局的时候用过媒介查询,media query。包括现在有的时候为了兼容也会用到一些,查找对应范围使用不同的样式 |
为了适应不同的设备终端 |
是用来适配各个尺寸设备的一个手段 |
媒体查询可不只是为了适应终端尺寸的,比如你做了一个网页看起来很漂亮,手机电脑平板都没啥大问题,但是如果你需要打印出来的时候,你会发现布局好像不是那么回事了,而且有时候你希望的是我打印的时候是不需要打印一些只需要体现在网页上的元素,这些media query都可以解决的,例如: @media print{
.site-footer-credits{ display: none;}
.noprint {display: none;}
.page-header {text-align: left}
} 而这些,其实很多网页做的都不尽如人意 |
|
结合bootstrap使用,根据不同的屏宽设置不同的样式 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
第46天 说说你对媒体查询的理解
The text was updated successfully, but these errors were encountered: