Created
September 24, 2014 11:58
-
-
Save momolog/e06374d3d0659f7c2c6c to your computer and use it in GitHub Desktop.
wkhtmltopdf and packery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<script type="text/javascript" charset="utf-8" src="packery.pkgd.min.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
window.onload = function(){ | |
var debug = document.querySelector('#debugger'); | |
debug.innerHTML += "<h1>Hello</h1>"; | |
debug.innerHTML += Packery; | |
var container = document.querySelector('#container'); | |
var pckry = new Packery( container, { | |
itemSelector: '.item', | |
gutter: 10 | |
}); | |
} | |
</script> | |
<style> | |
body { border: 1px solid red; width: 23cm} | |
.item { width: 25%; border: 1px solid blue} | |
.item.w2 { width: 50%; } | |
.item.h2 { height: 50px } | |
</style> | |
</head> | |
<body> | |
<div id="debugger"></div> | |
<div id="container"> | |
<div class="item">Opa</div> | |
<div class="item w2">Oma</div> | |
<div class="item">Papa</div> | |
<div class="item">Mama</div> | |
<div class="item h2">Rüdi</div> | |
<div class="item">Lotta</div> | |
<div class="item">Lena</div> | |
<div class="item">Lara</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment