flex_direction.rml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <rml>
  2. <head>
  3. <link type="text/rcss" href="/../Tests/Data/style.rcss" />
  4. <title>CSS Test: flex flow direction</title>
  5. <link href="https://test.csswg.org/suites/css-flexbox-1_dev/nightly-unstable/xhtml1/flex-direction.xht" rel="source" />
  6. <link href="http://www.github.com/sskyy" rel="author" title="houzhenyu" />
  7. <link href="http://www.w3.org/TR/css-flexbox-1/#flex-direction" rel="help" />
  8. <link href="reference/flex_direction-ref.rml" rel="match" />
  9. <meta content="The flow of flex items in the the flex container should observe the flex-direction property." name="assert" />
  10. <style>
  11. .flex-container {
  12. display: flex;
  13. margin: 20dp;
  14. background-color: #333;
  15. }
  16. .flex-item {
  17. width: 50dp;
  18. height: 50dp;
  19. margin: 20dp;
  20. background-color: #eee;
  21. line-height: 50dp;
  22. text-align: center;
  23. }
  24. .flex-container.flex-direction-row {
  25. flex-direction: row;
  26. }
  27. .flex-container.flex-direction-row-reverse {
  28. flex-direction: row-reverse;
  29. }
  30. .flex-container.flex-direction-column {
  31. flex-direction: column;
  32. }
  33. .flex-container.flex-direction-column-reverse {
  34. flex-direction: column-reverse;
  35. }
  36. </style>
  37. </head>
  38. <body>
  39. <h1>flex-direction:row</h1>
  40. <div class="flex-container flex-direction-row">
  41. <div class="flex-item">1</div>
  42. <div class="flex-item">2</div>
  43. <div class="flex-item">3</div>
  44. </div>
  45. <h1>flex-direction:row-reverse</h1>
  46. <div class="flex-container flex-direction-row-reverse">
  47. <div class="flex-item">1</div>
  48. <div class="flex-item">2</div>
  49. <div class="flex-item">3</div>
  50. </div>
  51. <h1>flex-direction:column</h1>
  52. <div class="flex-container flex-direction-column">
  53. <div class="flex-item">1</div>
  54. <div class="flex-item">2</div>
  55. <div class="flex-item">3</div>
  56. </div>
  57. <h1>flex-direction:column-reverse</h1>
  58. <div class="flex-container flex-direction-column-reverse">
  59. <div class="flex-item">1</div>
  60. <div class="flex-item">2</div>
  61. <div class="flex-item">3</div>
  62. </div>
  63. <handle size_target="#document"/>
  64. </body>
  65. </rml>