bottom-up.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>bottom up</title>
  6. <link rel="stylesheet" href="sandbox.css" />
  7. <style>
  8. #stamped .stamp1 {
  9. width: 30%;
  10. height: 100px;
  11. left: 30%;
  12. bottom: 20px;
  13. }
  14. #stamped .stamp2 {
  15. width: 200px;
  16. height: 50px;
  17. left: 20px;
  18. bottom: 50px;
  19. }
  20. </style>
  21. </head>
  22. <body>
  23. <h1>bottom up</h1>
  24. <div id="basic" class="container">
  25. <div class="item"></div>
  26. <div class="item h4"></div>
  27. <div class="item w2 h2"></div>
  28. <div class="item w2"></div>
  29. <div class="item h3"></div>
  30. <div class="item w3"></div>
  31. <div class="item"></div>
  32. <div class="item h4"></div>
  33. <div class="item"></div>
  34. <div class="item w2 h4"></div>
  35. <div class="item w2"></div>
  36. <div class="item h5"></div>
  37. <div class="item w3"></div>
  38. <div class="item"></div>
  39. <div class="item h4"></div>
  40. <div class="item"></div>
  41. <div class="item w2 h5"></div>
  42. <div class="item w2"></div>
  43. <div class="item h3"></div>
  44. <div class="item w3"></div>
  45. <div class="item"></div>
  46. </div>
  47. <div id="stamped" class="container">
  48. <div class="stamp stamp1"></div>
  49. <div class="stamp stamp2"></div>
  50. <div class="item"></div>
  51. <div class="item h4"></div>
  52. <div class="item w2 h2"></div>
  53. <div class="item w2"></div>
  54. <div class="item h3"></div>
  55. <div class="item w3"></div>
  56. <div class="item"></div>
  57. <div class="item h4"></div>
  58. <div class="item"></div>
  59. <div class="item w2 h4"></div>
  60. <div class="item w2"></div>
  61. <div class="item h5"></div>
  62. <div class="item w3"></div>
  63. <div class="item"></div>
  64. <div class="item h4"></div>
  65. <div class="item"></div>
  66. <div class="item w2 h5"></div>
  67. <div class="item w2"></div>
  68. <div class="item h3"></div>
  69. <div class="item w3"></div>
  70. <div class="item"></div>
  71. </div>
  72. <script src="../bower_components/eventEmitter/EventEmitter.js"></script>
  73. <script src="../bower_components/eventie/eventie.js"></script>
  74. <script src="../bower_components/doc-ready/doc-ready.js"></script>
  75. <script src="../bower_components/get-style-property/get-style-property.js"></script>
  76. <script src="../bower_components/get-size/get-size.js"></script>
  77. <script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
  78. <script src="../bower_components/matches-selector/matches-selector.js"></script>
  79. <script src="../bower_components/fizzy-ui-utils/utils.js"></script>
  80. <script src="../bower_components/outlayer/item.js"></script>
  81. <script src="../bower_components/outlayer/outlayer.js"></script>
  82. <script src="../masonry.js"></script>
  83. <script>
  84. docReady( function() {
  85. ( function() {
  86. var container = document.querySelector('#basic');
  87. var msnry = new Masonry( container, {
  88. isOriginTop: false,
  89. columnWidth: 60
  90. });
  91. })();
  92. ( function() {
  93. var container = document.querySelector('#stamped');
  94. var msnry = new Masonry( container, {
  95. itemSelector: '.item',
  96. isOriginTop: false,
  97. columnWidth: 60,
  98. gutter: 10,
  99. stamp: '.stamp'
  100. });
  101. })();
  102. });
  103. </script>
  104. </body>
  105. </html>