导航背景颜色

时间:2014-04-04 13:48:48

标签: css wordpress

我正在尝试更改导航栏上的“Get A Demo”(菜单项目-382),使其周围有方形彩色背景(#3EAABD)。

这是使用inspect元素工具的代码:

<header id="masthead" class="navbar navbar-fixed-top swatch-red-white text-caps" role="banner">
    <div class="container">
        <div class="navbar-header"></div>
        <nav class="collapse navbar-collapse main-navbar" role="navigation">
            <div class="menu-sidebar pull-right"></div>
            <div class="menu-main-menu-container">
                <ul id="menu-main-menu" class="nav navbar-nav navbar-right">
                    <li id="menu-item-342" class="menu-item menu-item-type-post_type menu-item-object-page cur… page-item-215 current_page_item menu-item-342 active active"></li>
                    <li id="menu-item-283" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-283"></li>
                    <li id="menu-item-282" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-282"></li>
                    <li id="menu-item-278" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-278"></li>
                    <li id="menu-item-329" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-329"></li>
                    <li id="menu-item-382" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-382">
                        <a href="http://theloyaltycloud.com/demo/" title="Get A Demo"></a>
                    </li>
                </ul>
            </div>

我该怎么做?我的Wordpress网站theloyaltycloud.com上的正确style.css文件在哪里可供我编辑?

目前,样式css文件只是这样说:

/* Theme Name: Angle
 * Theme URI: ///
 * Description: Angle Theme
 * Version: 1.4.0
 * Author: 
 * Author URI: 
 * Tags: responsive-layout, blue, brown, red, custom-background, custom-colors, custom-menu, featured-images, flexible-header, full-width-template, post-formats, sticky-post, theme-options, threaded-comments, translation-ready
 * License: envato marketplace licence
 */

希望这是有道理的,因为我在这里试图去做,

非常感谢大家,

加雷

1 个答案:

答案 0 :(得分:0)

将您的css文件更改为:

/* Theme Name: Angle
 * Theme URI: ///
 * Description: Angle Theme
 * Version: 1.4.0
 * Author: 
 * Author URI: 
 * Tags: responsive-layout, blue, brown, red, custom-background, custom-colors, custom-menu,     featured-images, flexible-header, full-width-template, post-formats, sticky-post, theme-options, threaded-comments, translation-ready
 * License: envato marketplace licence
 */

#menu-item-382 
{
    background-color: #3EAABD;
}

这只会将该菜单选项的背景颜色更改为该颜色