search

Home  >  Q&A  >  body text

How to expand the header of a panel with css target

<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>
P粉546138344P粉546138344540 days ago527

reply all(1)I'll reply

  • P粉770375450

    P粉7703754502023-07-25 16:57:07

    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


    .mud-expand-panel-header{
        color:pink;
    }

    reply
    0
  • Cancelreply