Skip to content

Instantly share code, notes, and snippets.

@manabuyasuda
Created February 15, 2016 15:07
Show Gist options
  • Select an option

  • Save manabuyasuda/d000bcdcf5ea7ac17c9c to your computer and use it in GitHub Desktop.

Select an option

Save manabuyasuda/d000bcdcf5ea7ac17c9c to your computer and use it in GitHub Desktop.
半分のサイズを指定する方法のRetina対応に使うCSS
<!-- 実際の画像サイズの半分を指定する -->
<img src="" alt="" width="100px" height="100px" class="image-unset"/>
// @desc - ブレイクポイント以降は実際の画像のサイズで描画される
.image-unset-md {
@media screen and (min-width: 768px) {
width: auto;
}
}
.image-unset-lg {
@media screen and (min-width: 1000px) {
width: auto;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment