frame.rs 2.0 KB

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