dioxus/examples/text.rs

102 lines
2.5 KiB
Rust
Raw Normal View History

2022-01-01 04:53:37 +00:00
use dioxus::prelude::*;
fn main() {
2022-01-12 14:40:36 +00:00
rink::launch(app);
2022-01-01 04:53:37 +00:00
}
fn app(cx: Scope) -> Element {
cx.render(rsx! {
div {
width: "100%",
height: "100%",
flex_direction: "column",
// justify_content: "center",
// align_items: "center",
// flex_direction: "row",
// background_color: "red",
p {
background_color: "black",
flex_direction: "column",
justify_content: "center",
align_items: "center",
// height: "10%",
"hi"
"hi"
"hi"
}
li {
background_color: "red",
flex_direction: "column",
justify_content: "center",
align_items: "center",
// height: "10%",
"bib"
"bib"
"bib"
"bib"
"bib"
"bib"
"bib"
"bib"
}
li {
background_color: "blue",
flex_direction: "column",
justify_content: "center",
align_items: "center",
// height: "10%",
"zib"
"zib"
"zib"
"zib"
"zib"
"zib"
}
p {
background_color: "yellow",
"asd"
}
p {
background_color: "green",
"asd"
}
p {
background_color: "white",
"asd"
}
p {
background_color: "cyan",
"asd"
}
2022-02-12 20:03:08 +00:00
div {
font_weight: "bold",
color: "#666666",
p{
"bold"
}
p {
font_weight: "normal",
" normal"
}
}
p {
font_style: "italic",
color: "red",
"italic"
}
p {
text_decoration: "underline",
color: "rgb(50, 100, 255)",
"underline"
}
p {
text_decoration: "line-through",
color: "hsl(10, 100%, 70%)",
"line-through"
}
2022-01-01 04:53:37 +00:00
}
})
}