flexbox-unbreakable-child-1-ref.html 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <!DOCTYPE html>
  2. <!-- Any copyright is dedicated to the Public Domain.
  3. http://creativecommons.org/publicdomain/zero/1.0/ -->
  4. <html>
  5. <head>
  6. <style>
  7. .multicol {
  8. height: 10px;
  9. width: 100px;
  10. -moz-column-width: 30px;
  11. -moz-column-fill: auto;
  12. border: 2px solid orange;
  13. margin-bottom: 15px; /* (just for spacing between testcases) */
  14. }
  15. .flexContainer {
  16. background: teal;
  17. border: 1px dashed black;
  18. }
  19. .item {
  20. display: block;
  21. width: 100%;
  22. height: 20px;
  23. }
  24. </style>
  25. </head>
  26. <body>
  27. <!-- auto-height container: -->
  28. <div class="multicol">
  29. <div class="flexContainer">
  30. <img src="" class="item">
  31. </div>
  32. </div>
  33. <!-- fixed-height container, smaller than available height: -->
  34. <div class="multicol">
  35. <div class="flexContainer" style="height: 8px">
  36. <img src="" class="item">
  37. </div>
  38. </div>
  39. <!-- fixed-height container, between available height and child height: -->
  40. <div class="multicol">
  41. <div class="flexContainer" style="height: 15px">
  42. <img src="" class="item">
  43. </div>
  44. </div>
  45. <!-- fixed-height container, same as child height: -->
  46. <div class="multicol">
  47. <div class="flexContainer" style="height: 20px">
  48. <img src="" class="item">
  49. </div>
  50. </div>
  51. <!-- fixed-height container, larger than child height: -->
  52. <div class="multicol">
  53. <div class="flexContainer" style="height: 24px">
  54. <img src="" class="item">
  55. </div>
  56. </div>
  57. </body>
  58. </html>