flexbox-box-sizing-on-items-vert-1-ref.html 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <!DOCTYPE html>
  2. <!--
  3. Any copyright is dedicated to the Public Domain.
  4. http://creativecommons.org/publicdomain/zero/1.0/
  5. -->
  6. <html>
  7. <head>
  8. <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
  9. <meta charset="utf-8">
  10. <style>
  11. .container {
  12. width: 30px;
  13. height: 100px;
  14. border: 1px solid black;
  15. float: left;
  16. margin: 2px;
  17. }
  18. .itemA {
  19. width: 22px;
  20. height: 22px;
  21. background: purple;
  22. border: 4px solid indigo;
  23. }
  24. .itemB {
  25. width: 20px;
  26. height: 40px;
  27. background: teal;
  28. border: 5px solid lightblue;
  29. }
  30. </style>
  31. </head>
  32. <body>
  33. <!-- FIRST ROW -->
  34. <!-- 1 inflexible item -->
  35. <div class="container">
  36. <div class="itemA"></div>
  37. </div>
  38. <!-- 1 flexible item -->
  39. <div class="container">
  40. <div class="itemA" style="height: 92px"></div>
  41. </div>
  42. <div style="clear: both"></div>
  43. <!-- SECOND ROW -->
  44. <!-- 2 inflexible items -->
  45. <div class="container">
  46. <div class="itemA"></div>
  47. <div class="itemB"></div>
  48. </div>
  49. <!-- 2 flexible items -->
  50. <div class="container">
  51. <div class="itemA" style="height: 32px"></div>
  52. <div class="itemB" style="height: 50px"></div>
  53. </div>
  54. </body>
  55. </html>