Skip to content

Instantly share code, notes, and snippets.

@takaya1992
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takaya1992/6d904bf8856c600d3635 to your computer and use it in GitHub Desktop.
Save takaya1992/6d904bf8856c600d3635 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<meta name="format-detection" content="telephone=no" />
<style>
body {
padding: 20px;
}
div {
margin: 20px;
}
.box {
border-radius: 5px;
}
.hoge {
}
.fuga {
border: solid 1px #000;
}
.piyo1 {
border: solid 0.5px #000;
}
.piyo2 {
border: solid .99px #000;
}
@media screen and (-webkit-min-device-pixel-ratio: 1){
.hoge{
border: solid 1px #000;
box-shadow: 0 1px 0 rgba(255,255,255,.2) inset,
0 1px 1px rgba(0,0,0,.08);
}
.hoge:after {
content: 'no retina';
}
}
@media screen and (-webkit-min-device-pixel-ratio: 2){
.hoge{
/*border: solid .99px #000;*/
box-shadow: 0 1px 0 rgba(255,255,255,.2) inset,
0 1px 1px rgba(0,0,0,.08);
}
.hoge:after {
content: 'retina';
}
}
</style>
</head>
<body>
<div class="box hoge">
hoge
</div>
<div class="box fuga">
fuga
</div>
<div class="box piyo1">
0.5px
</div>
<div class="box piyo2">
0.99px
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment