flex_02.rml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <rml>
  2. <head>
  3. <link type="text/rcss" href="/../Tests/Data/style.rcss" />
  4. <title>Flex 02 - Various features</title>
  5. <meta name="Description" content="Testing various flexible box layout features. Should be comparable to the output in a web browser." />
  6. <style>
  7. .flex-container {
  8. display: flex;
  9. margin: 10dp 20dp;
  10. background-color: #333;
  11. max-height: 210dp;
  12. flex-wrap: wrap-reverse;
  13. }
  14. .flex-item {
  15. width: 50dp;
  16. margin: 20dp;
  17. background-color: #eee;
  18. height: 50dp;
  19. text-align: center;
  20. }
  21. .flex-direction-row {
  22. flex-direction: row;
  23. }
  24. .flex-direction-row-reverse {
  25. flex-direction: row-reverse;
  26. }
  27. .flex-direction-column {
  28. flex-direction: column;
  29. }
  30. .flex-direction-column-reverse {
  31. flex-direction: column-reverse;
  32. }
  33. .absolute {
  34. margin: 0;
  35. position: absolute;
  36. right: 0;
  37. bottom: 10dp;
  38. }
  39. </style>
  40. </head>
  41. <body>
  42. <div class="flex-container flex-direction-row" style="position: relative">
  43. <div class="flex-item absolute">Abs</div>
  44. <div class="flex-item" style="margin: 50dp;">1</div>
  45. <div class="flex-item" style="margin-top: auto">2</div>
  46. <div class="flex-item" style="margin: auto">3</div>
  47. </div>
  48. <div class="flex-container flex-direction-row-reverse" style="height: 200dp; justify-content: space-around;">
  49. <div class="flex-item">1</div>
  50. <div class="flex-item" style="margin-bottom: auto;">2</div>
  51. <div class="flex-item" style="margin-right: 40dp;">3</div>
  52. </div>
  53. <div class="flex-container flex-direction-column">
  54. <div class="flex-item" id="test" style="margin-right: auto">1</div>
  55. <div class="flex-item">2</div>
  56. <div class="flex-item">3</div>
  57. </div>
  58. <div class="flex-container flex-direction-column-reverse">
  59. <div class="flex-item">1</div>
  60. <div class="flex-item">2 LONG_OVERFLOWING_WORD</div>
  61. <div class="flex-item">3</div>
  62. </div>
  63. <handle size_target="#document"/>
  64. </body>
  65. </rml>