Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

レスポンシブ メディアクエリ

More than 3 years have passed since last update.

そのままコピペで使える用にメモ。

メディアクエリのメモ

@media screen and (min-width:480px) { 
/* 画面サイズが480pxからはここを読み込む */
}
@media screen and (min-width:768px) and ( max-width:1024px) {
/* 画面サイズが768pxから1024pxまではここを読み込む */
}
@media screen and (min-width:1024px) {
/* 画面サイズが1024pxからはここを読み込む */

sassの@mixin

@mixin mediaSP {
  @media screen and (min-width:480px) and (max-width:$break-pointSP) {
    @content
  }
}

@mixin mediaT {
  @media screen and (min-width:$break-pointSP) and (max-width:$break-pointPC) {
    @content
  }
}

@mixin mediaPC {
  @media screen and (min-width:$break-pointPC) {
    @content
  }
}

参考:http://qiita.com/kyaido/items/828906ffa7198e99d0b7

cotolier_risa
良いと思ってもすぐ忘れるのでQiitaに記録していけたらなぁと思います。 ミスや不具合等ありましたらお気軽にご指摘いただけると助かります。
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away