һ
 ע

QQ¼

ֻһٿʼ

ƼĶ

+

[CSS] @mediaʵҳӦеļؼֱ

[]
24882 happy175 2016-3-3 16:51:28
| ʾȫ¥
1F

ϵ½עᣬύѣø๦ܣϴزIJޣ

Ҫ ¼ ſػ鿴ûʺţע  

x
Ϊֱͬ豸ͬڴС²ִλͷ,@media screenʵҳֵӦ,豸ͳ⡣׷ֱǶٵʱأ


ȿĴ,Ǵbootstrapбģmin-widthȷϷֱ

7689921200Ȼ˹ȥҲЩ豸600 480ģЩСֱʵǶΪС767ġΪʲôС767768أΪcss@media (min-width: 768px)ʾС768Ҳ>=768еڣжϸС豸@media (max-width: 767px)߱ʾ<=767Ͳгͻ

29381f30e924b899bb544b8d6d061d950a7bf61e.jpg




ǿԿмٽķֱʣôǾͿɵдԼӦ


@media (min-width: 768px){ //>=768豸 }

@media (min-width: 992px){ //>=992豸 }

@media (min-width: 1200){ //>=1200豸 }


ע˳@media (min-width: 768px)дôܱ磬


@media (min-width: 1200){ //>=1200豸 }

@media (min-width: 992px){ //>=992豸 }

@media (min-width: 768px){ //>=768豸 }


Ϊ1440,1440>768ô1200ͻʧЧ


min-widthʱСķ棬ͬmax-widthôǴ棬С


@media (max-width: 1199){ //<=1199豸 }

@media (max-width: 991px){ //<=991豸 }

@media (max-width: 767px){ //<=768豸 }


ѧϰǾͿ߼ĻӦ


@media screen and (min-width:1200px){ #page{ width: 1100px; }#content,.div1{width: 730px;}#secondary{width:310px} }
@media screen and (min-width: 960px) and (max-width: 1199px) { #page{ width: 960px; }#content,.div1{width: 650px;}#secondary{width:250px}select{max-width:200px} }
@media screen and (min-width: 768px) and (max-width: 959px) { #page{ width: 900px; }#content,.div1{width: 620px;}#secondary{width:220px}select{max-width:180px} }
@media only screen and (min-width: 480px) and (max-width: 767px){ #page{ width: 450px; }#content,.div1{width: 420px;position: relative; }#secondary{display:none}#access{width: 450px; }#access a {padding-right:5px}#access a img{display:none}#rss{display:none}#branding #s{display:none} }
@media only screen and (max-width: 479px) { #page{ width: 300px; }#content,.div1{width: 300px;}#secondary{display:none}#access{width: 330px;} #access a {padding-right:10px;padding-left:10px}#access a img{display:none}#rss{display:none}#branding #s{display:none}#access ul ul a{width:100px} }


Ĵõ screenָʾΪʾ豸Ҳprintӡ豸һscreen߸ɴʡԡ뿴ϸĹmedia˵ٶһ¹media query֪ʶ

ǰûע  2016-3-17 17:26
Դ΢http://weibo.com/techued Դ΢Źںţweb-tech
ʹõ ٱ ظ
fhuj3d96 2017-1-5 00:36:17
| ʾȫ¥
2F
¥ϵԵ
ȷӡˢ  http://www.soucx.com
ӡˢ  http://www.soucx.com
ȷֽ䳧  http://www.soucx.com
ȷӡˢ  http://soucx.com/
ӡˢ  http://soucx.com/
ȷֽ䳧  http://soucx.com/
Դ΢http://weibo.com/techued Դ΢Źںţweb-tech
ʹõ ٱ ظ ֧
б

ֹ

²

̳¡ͼƬѷϴվԭתԻ,µİȨԭ
վַİȨ֪ͨǵĹԱ,Ա(Email:admin@websjy.com)ʱȡȨɾ
ܾκκʽڱ̳л񹲺͹ִ!

QQ| 42011102000510|Archiver|ֻ|Դ ( ICP14013341-1

GMT+8, 2017-11-22 18:48

Powered by Discuz! X3.2

ԴԴվ  ԴAPPӦ֮

ٻظ ض б