How to expand the header of a panel with css target
P粉546138344
2023-07-24 20:17:03
<p>I want the MudExpansionPanel's header to be a different color than the body of the panel's content. </p><p>MudExpansionPanel is assigned pink color in the Style property. </p><p><br /></p>
<p><code> <MudExpansionPanel Text="Heading text" Style="@($"background-color:pink; color:black"></code></p>
<p>This will flip the entire panel (including when expanded). I just want to change the color of the title. How do I implement this?</p><p>EDIT: Sorry I didn't explain it clearly. I wanted the colors to be vibrant. So I want one panel to be pink, the other blue and so on. </p><p><br /></p>
First, add a custom CSS file to the project and register it in index.html or _Host.cshtml
Pay attention to the priority of the CSS file
Then press the style below Apply your desired style