How to use internal styling in Maui Blazor Hybrid apps? My code follows.
The background-color stying is ignored.
@page "/"
<style>
background-color : blue;
</style>
<h1>Hello, world!</h1>
CoderGuy {
}
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
It’s ignored because it’s not valid css.
You can either use inline style:
Or define a css class:
But it’s not good idea to add style tag inside razor component like that.
You should use “css isolation” which is a blazor feature.
Index.razor:
Create Index.razor.css: