flex_absolutely_positioned.rml 933 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <rml>
  2. <head>
  3. <title>Flex - Absolutely positioned</title>
  4. <link type="text/rcss" href="../style.rcss"/>
  5. <meta name="Description" content="Test absolutely positioned and floated flex containers." />
  6. <style>
  7. .flex {
  8. display: flex;
  9. height: 100dp;
  10. width: 40%;
  11. text-align: center;
  12. flex-direction: row;
  13. }
  14. .flex > :nth-child(1) { width: 20%; background: red; }
  15. .flex > :nth-child(2) { width: 60%; background: green; }
  16. .flex > :nth-child(3) { width: 20%; background: blue; }
  17. .absolute {
  18. position: absolute;
  19. left: 20dp;
  20. bottom: 20dp;
  21. }
  22. .float {
  23. float: right;
  24. }
  25. </style>
  26. </head>
  27. <body>
  28. <div class="flex">
  29. <div>1</div>
  30. <div>2</div>
  31. <div>3</div>
  32. </div>
  33. <hr/>
  34. <div id="absolute" class="flex absolute">
  35. <div>1</div>
  36. <div>2</div>
  37. <div>3</div>
  38. </div>
  39. <hr/>
  40. <div id="float" class="flex float">
  41. <div>1</div>
  42. <div>2</div>
  43. <div>3</div>
  44. </div>
  45. <handle size_target="#document"/>
  46. </body>
  47. </rml>