flex.rs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. use dioxus::prelude::*;
  2. fn main() {
  3. dioxus_tui::launch(app);
  4. }
  5. fn app() -> Element {
  6. rsx! {
  7. div {
  8. width: "100%",
  9. height: "100%",
  10. flex_direction: "column",
  11. // justify_content: "center",
  12. // align_items: "center",
  13. // flex_direction: "row",
  14. // background_color: "red",
  15. p {
  16. background_color: "black",
  17. flex_direction: "column",
  18. justify_content: "center",
  19. align_items: "center",
  20. // height: "10%",
  21. "hi"
  22. "hi"
  23. "hi"
  24. }
  25. li {
  26. background_color: "red",
  27. flex_direction: "column",
  28. justify_content: "center",
  29. align_items: "center",
  30. // height: "10%",
  31. "bib"
  32. "bib"
  33. "bib"
  34. "bib"
  35. "bib"
  36. "bib"
  37. "bib"
  38. "bib"
  39. }
  40. li {
  41. background_color: "blue",
  42. flex_direction: "column",
  43. justify_content: "center",
  44. align_items: "center",
  45. // height: "10%",
  46. "zib"
  47. "zib"
  48. "zib"
  49. "zib"
  50. "zib"
  51. "zib"
  52. "zib"
  53. "zib"
  54. "zib"
  55. "zib"
  56. "zib"
  57. "zib"
  58. "zib"
  59. }
  60. p {
  61. background_color: "yellow",
  62. "asd"
  63. }
  64. p {
  65. background_color: "green",
  66. "asd"
  67. }
  68. p {
  69. background_color: "white",
  70. "asd"
  71. }
  72. p {
  73. background_color: "cyan",
  74. "asd"
  75. }
  76. }
  77. }
  78. }