Skip to content

Instantly share code, notes, and snippets.

@yukulele
Created August 29, 2012 13:04
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 yukulele/3512186 to your computer and use it in GitHub Desktop.
Save yukulele/3512186 to your computer and use it in GitHub Desktop.
css3 new units: vh, vw, vmin, vmax
/* css3 new units: vh, vw, vmin, vmax */
/* (webkit) */
div{
position:absolute;
top:0;
left:0;
}
#d0{
height:20vmax;
width:20vmax;
background:rgba(0,0,0,.1);
}
#d1{
height:20vh;
width:20vw;
background:rgba(255,0,0,.1);
}
#d2{
height:20vw;
width:20vh;
background:rgba(0,255,0,.1);
}
#d3{
height:20vmin;
width:20vmin;
background:rgba(0,0,255,.1);
}
<div id="d0"></div>
<div id="d1"></div>
<div id="d2"></div>
<div id="d3"></div>
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment