【问题标题】:Is possible to change sidebar color when using AdminLTE template?使用 AdminLTE 模板时是否可以更改侧边栏颜色?
【发布时间】:2022-12-20 20:20:08
【问题描述】:

我正在使用 AdminLTE 3.2 版模板,我想更改模板侧边栏的颜色。那可能吗?我的意思是除了深色和浅色

谢谢

【问题讨论】:

    标签: bootstrap-4 colors background sidebar adminlte


    【解决方案1】:

    您很可能只需要根据需要从 AdminLTE 更改原始 css 文件。

    【讨论】:

    • 我试过更改原始 css 文件,我已经像这样更改了它 .layout-navbar-fixed .wrapper .sidebar-dark-primary .brand-link:not([class*="navbar"]) { background-color: #DD7C0A !important; } 但它没有改变
    【解决方案2】:

    你可以用它的给定类或自定义样式来改变它

    sidebar-dark-primary 负责改变侧边栏的背景色

    <aside class="main-sidebar sidebar-dark-primary elevation-4"
    

    自定义样式

    <aside class="main-sidebar sidebar-dark-primary elevation-4" style="background-color: green">
    

    要么

    <aside class="main-sidebar sidebar-dark-primary elevation-4" style="background-color: #ffff">
    

    【讨论】:

      【解决方案3】:

      我在https://github.com/ColorlibHQ/AdminLTE/issues/1164 找到它。

      如果你添加 !important 它将改变,比如:.main-sidebar { 背景色:#333 !important }。

      【讨论】:

        猜你喜欢
        • 2019-07-29
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-09-18
        • 1970-01-01
        • 1970-01-01
        • 2020-01-10
        • 1970-01-01
        相关资源
        最近更新 更多