How to style the html element? #1749
Closed
cjsmocjsmo
started this conversation in
General
Replies: 1 comment
-
Well seems I have answered my own question. I stumbled upon sir it has a global_css! macro which allowed me to set the html elements background-color
Sorry for the noise :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey guys I'm just starting out with dioxus and I'm working the basic fullstack example in the docs. The question is how do you style the html element? Here is a screen shot showing the problem.
![20231226_09h48m20s_grim](https://private-user-images.githubusercontent.com/8879432/292903415-9563c6c5-dc59-4ae0-8f93-bfe9ceb07ee5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MzExNDAsIm5iZiI6MTczOTYzMDg0MCwicGF0aCI6Ii84ODc5NDMyLzI5MjkwMzQxNS05NTYzYzZjNS1kYzU5LTRhZTAtOGY5My1iZmU5Y2ViMDdlZTUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTVUMTQ0NzIwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YzFjMTY2YTQ1ZDM0MTdhYTQ5N2YyZDMxZjYyYWEyNzg5MjkzYjdmNTg0MmNlMmU3MjhhMWQ1ODllN2QxNDAwZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.22vMd4jssIwWC0Cw0R93dtZYjVQh8TjD39UfHdQ8mSA)
I would like for the entire background to be black. When inspecting the page in devtools the white border is caused by the html element on the page. So how do I style the html element?
This is my code so far
<
#![allow(non_snake_case, unused)]
use dioxus::prelude::;
use dioxus_fullstack::prelude::;
fn main() {
LaunchBuilder::new(app).launch();
}
fn app(cx: Scope) -> Element {
let mut count = use_state(cx, || 0);
let img_path = "http://192.168.0.74:9191/landscape/20220731_112129.webp";
}
Beta Was this translation helpful? Give feedback.
All reactions