html - 在基础中更改顶部栏部分右侧的 CSS

标签 html css zurb-foundation

我想用基础创建响应式大型菜单,问题是我尝试了所有方法,但我无法更改菜单右侧部分的颜色,它仍然是黑色。我更改了顶部栏的颜色它现在是灰色的,但 .top-bar-section 没有改变。这是我的 CSS 代码:

    .top-bar{
    background-color:gray !important;
}

    .top-bar .expanded{
        background-color:gray !important;

}
.top-bar-section ul li.active>a{
    color:black !important;
    background-color:gray !important;
}

    .mega-menu {
        border-top: 1px solid #222;
    }
    .mega-menu .top-bar-section .right> li{
        background-color:blue !important;
    }
        /* Change tab hover state to same colour as content background */
        .mega-menu .top-bar .top-bar-section li:hover > a {
            color: #222;
            background: #FFF;
        }

我想改变顶部栏部分的背景颜色,但它没有改变 这是我的代码的一部分:

<div class="mega-menu">
        <nav class="top-bar" data-topbar="">
            <ul class="title-area">
                <li class="name">
                    <h1><a href="#">Tojjar</a></h1>
                </li>
                <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
            </ul>
            <section class="top-bar-section">

                <ul class="right">
                    <li><a><strong class="fontstyle">درباره ما</strong></a></li>
                    <li><a><strong class="fontstyle">راهنما</strong></a></li>
                    <li><a><strong class="fontstyle">تماس با ما</strong></a></li>

谢谢。

最佳答案

在我最近安装的 FoundationPress 中,我相信它具有以下两个属性:

.top-bar-section li.active:not(.has-form) a:not(.button) {background:$color !important;}

@media only screen and (min-width: 64.063em){.top-bar-section li:not(.has-form) a:not(.button):hover {background:$color !important;}}   

那个侧 block 与我想要的颜色相匹配。

(顶栏颜色没有改变这两个设置)

关于html - 在基础中更改顶部栏部分右侧的 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27528727/

相关文章:

html - <li> 换行填充错误 - 尝试在正确维护左边框的同时解决

如果按下按钮,Javascript 自动刷新 HTML

javascript - jQuery 图像交叉淡入淡出问题

html - 为什么 Chrome 和 Opera 会忽略我的字母间距 : 0. 03em;?

html - 将 PSD 转换为 HTML 和 CSS

css - 是否可以@extend Foundation SCSS 类?

jquery - Foundation 4 Reveal 和 WP AJAX : Previous/Next Modal Window from Open Modal Window?

html - html中的缩进标签是什么?

javascript - offset().top 给出了错误的值

html - 网站 foobared 中等浏览器大小及以下 (zurb foundation)