Skip to content

Instantly share code, notes, and snippets.

@frankinedinburgh
Created December 6, 2014 16:12
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 frankinedinburgh/37901e2bdc5f541ac568 to your computer and use it in GitHub Desktop.
Save frankinedinburgh/37901e2bdc5f541ac568 to your computer and use it in GitHub Desktop.
Bill Murray Placeholder
<h1>Fill Murray <em>http://www.fillmurray.com/</em></h1>
<div id="murray" class="grid">
</div>
var images =[
'http://fillmurray.com/200/200',
'http://fillmurray.com/g/400/400',
'http://fillmurray.com/g/600/600',
'http://fillmurray.com/g/700/700',
'http://fillmurray.com/g/800/800',
'http://fillmurray.com/g/900/900',
'http://fillmurray.com/g/1200/1200',
'http://fillmurray.com/g/500/500'
];
for( i=0; i < images.length; i++ ){
images[i] = '<div class="col-1-4"><figure><img src="'+ images[i] + '"/></figure></div>';
}
$('#murray').html(images);
/*console.log(images);*/
@import "bourbon";
*{
outline: 1px solid red;
background-color: rgba(red, .15);
}
figure{
/* max-height: 200px; */
overflow: hidden;
position: relative;
padding: 0.5em;
margin: 0;
img{
/* corrects inline gap in enclosing div */
display: block;
max-width: 100%;
width: 100%;
overflow: hidden;
/* just in case, to force correct aspect ratio */
height: auto !important;
width: auto\9; /* ie8+9 */
/* lt ie8 */
-ms-interpolation-mode: bicubic;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment