Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Responsive设计

w3cplus
November 21, 2012

 Responsive设计

Responsive设计的基本概念

w3cplus

November 21, 2012
Tweet

More Decks by w3cplus

Other Decks in Technology

Transcript

  1. Responsive Responsive Responsive Responsive 设计 作者: 大漠 QQ: 81059347 Blog:

    http://www.w3cplus.com 新浪微薄:http://weibo.com/w3cplus
  2. Responsive Responsive Responsive Responsive 设计 http://www.w3cplus.com/css3/media-queries-alistpart http://www.w3cplus.com/css3/media-queries-alistpart http://www.w3cplus.com/css3/media-queries-alistpart http://www.w3cplus.com/css3/media-queries-alistpart http://www.alistapart.com/d/responsive-web-

    http://www.alistapart.com/d/responsive-web- http://www.alistapart.com/d/responsive-web- http://www.alistapart.com/d/responsive-web- design/ex/ex-site-FINAL.html design/ex/ex-site-FINAL.html design/ex/ex-site-FINAL.html design/ex/ex-site-FINAL.html
  3. Responsive Responsive Responsive Responsive 设计 @media only screen and (min-device-width

    : 320px) and (max-device-width : 480px) { /* Styles */ } http://www.w3cplus.com/css3/css3-media-queries-for-different- devices Smartphones (portrait and landscape)
  4. Responsive Responsive Responsive Responsive 设计 @media only screen and (min-width

    : 321px) { /* Styles */ } http://www.w3cplus.com/css3/css3-media-queries-for-different- devices Smartphones (landscape)
  5. Responsive Responsive Responsive Responsive 设计 @media only screen and (max-width

    : 320px) { /* Styles */ } http://www.w3cplus.com/css3/css3-media-queries-for-different- devices Smartphones (portrait)
  6. Responsive Responsive Responsive Responsive 设计 @media only screen and (min-device-width

    : 768px) and (max-device-width : 1024px) { /* Styles */ } http://www.w3cplus.com/css3/css3-media-queries-for-different- devices iPads (portrait and landscape)
  7. Responsive Responsive Responsive Responsive 设计 @media only screen and (min-device-width

    : 768px) and (max-device-width : 1024px) and (orientation : landscape) { /* Styles */ } http://www.w3cplus.com/css3/css3-media-queries-for-different- devices iPads (landscape)
  8. Responsive Responsive Responsive Responsive 设计 @media only screen and (min-device-width

    : 768px) and (max-device-width : 1024px) and (orientation : portrait) { /* Styles */ } http://www.w3cplus.com/css3/css3-media-queries-for-different- devices iPads (portrait)
  9. Responsive Responsive Responsive Responsive 设计 @media only screen and (-webkit-min-device-

    pixel-ratio : 1.5),only screen and (min-device- pixel-ratio : 1.5) { /* Styles */ } http://www.w3cplus.com/css3/css3-media-queries-for-different- devices iPhone 4
  10. Responsive Responsive Responsive Responsive 设计 @media screen and (max-width :

    640px) { /* CSS Styles */ } http://www.w3cplus.com/css3/css3-media-queries-for-different- devices 640px显屏
  11. Responsive Responsive Responsive Responsive 设计 @media screen and (max-width :

    800px) { /* CSS Styles */ } http://www.w3cplus.com/css3/css3-media-queries-for-different- devices 800px显屏
  12. Responsive Responsive Responsive Responsive 设计 @media screen and (max-width :

    1024px) { /* CSS Styles */ } http://www.w3cplus.com/css3/css3-media-queries-for-different- devices 1024显屏
  13. Responsive Responsive Responsive Responsive 设计 @media only screen and (min-width

    : 1224px) { /* Styles */ } http://www.w3cplus.com/css3/css3-media-queries-for-different- devices Desktops and laptops
  14. Responsive Responsive Responsive Responsive 设计 @media only screen and (min-width

    : 1824px) { /* Styles */ } http://www.w3cplus.com/css3/css3-media-queries-for-different- devices Large screens
  15. Responsive Responsive Responsive Responsive 设计 容器撑破了怎么办? *{ -webkit-box-sizing: border-box; -moz-box-sizing:

    border-box; -o-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; }
  16. Responsive Responsive Responsive Responsive 设计 图片怎么自适应? <img src="image.jpg" data-src-600px="image-600px.jpg" data-src-

    800px="image-800px.jpg" alt=""> @media (min-device-width:600px) { img[data-src-600px] { content: attr(data-src-600px, url); } } @media (min-device-width:800px) { img[data-src-800px] { content: attr(data-src-800px, url); } }