I can't figure out how to change the color of text in span or by changing the class atribute.
fn main() {
dioxus_web::launch(launcher)
}
fn launcher(cx : Scope) -> Element {
cx.render(rsx!{
div {
display : "flex",
flex_direction : "column",
width : "100%",
div {
display : "flex",
justify_content : "flex-start",
span {
class : "testing",
color : "red", // Need change here.
onmousedown : move |event| {
},
"This is a left text"
}
}
div {
display : "flex",
justify_content : "flex-end",
span {
class : "testing",
color : "blue",
"This is a right text"
}
}
}
})
}
My brain is being destroyed. I.e. when I want to change the color only for hovered element using the jQuery I simply write :
$(this).css("color", "black")
How can I change the color in this case?