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

脱残念Webデザイン CSS編

Toshiaki Sasaki
February 06, 2014

脱残念Webデザイン CSS編

2014年2月6日に開催された「第13回 さくらの夕べ in 鯖江」で使用したスライドです。

Toshiaki Sasaki

February 06, 2014
Tweet

More Decks by Toshiaki Sasaki

Other Decks in Design

Transcript

  1. flexbox .selector { display: flex; } .selector .box1{ flex: 1;

    order: 1; } .selector .box2{ flex: 1; order: 2; } .selector .box3{ flex: 1; order: 3; }  .selector .box1 .box2 .box3
  2. Media Queries @media screen and (min-width: 480px) .selector { background:

    #ff0000; } } @media screen and (max-width: 479px) .selector { background: #0072ff; } }          display size > 480px display size < 479px
  3. Media Queries + Flexbox @media screen and (max-width: 479px) {

    .selector { display: flex; flex-direction: column; } .selector .box1 { order: 1; } .selector .box2 { order: 3; } .selector .box3 { order: 2; } }        display size > 480px display size < 479px .box1 .box2 .box3 .box1 .box3 .box2