fit-width.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>fit width</title>
  6. <link rel="stylesheet" href="sandbox.css" />
  7. <style>
  8. .container {
  9. margin: 0 auto;
  10. }
  11. </style>
  12. </head>
  13. <body>
  14. <h1>fit width</h1>
  15. <div class="container">
  16. <div class="item w2"></div>
  17. <div class="item w2 h4"></div>
  18. <div class="item w2 h2"></div>
  19. <div class="item w2"></div>
  20. <div class="item w2 h3"></div>
  21. <div class="item w4"></div>
  22. <div class="item w2"></div>
  23. <div class="item w2 h4"></div>
  24. <div class="item w2"></div>
  25. <div class="item w2 h4"></div>
  26. <div class="item w4"></div>
  27. <div class="item w2 h5"></div>
  28. <div class="item w4"></div>
  29. <div class="item w2"></div>
  30. <div class="item w2 h4"></div>
  31. <div class="item w2"></div>
  32. <div class="item w2 h5"></div>
  33. <div class="item w2"></div>
  34. <div class="item w2 h3"></div>
  35. <div class="item w4"></div>
  36. <div class="item w2"></div>
  37. </div>
  38. <script src="../bower_components/eventEmitter/EventEmitter.js"></script>
  39. <script src="../bower_components/eventie/eventie.js"></script>
  40. <script src="../bower_components/doc-ready/doc-ready.js"></script>
  41. <script src="../bower_components/get-style-property/get-style-property.js"></script>
  42. <script src="../bower_components/get-size/get-size.js"></script>
  43. <script src="../bower_components/jquery-bridget/jquery.bridget.js"></script>
  44. <script src="../bower_components/matches-selector/matches-selector.js"></script>
  45. <script src="../bower_components/fizzy-ui-utils/utils.js"></script>
  46. <script src="../bower_components/outlayer/item.js"></script>
  47. <script src="../bower_components/outlayer/outlayer.js"></script>
  48. <script src="../masonry.js"></script>
  49. <script>
  50. docReady( function() {
  51. var msnry = new Masonry( '.container', {
  52. isFitWidth: true,
  53. columnWidth: 120
  54. });
  55. });
  56. </script>
  57. </body>
  58. </html>