How to change the menu color

时间:2013-02-24 作者:Stonydallas

我需要将wordpress 2011主题的菜单颜色更改为透明。

这是标题

<nav id="access" role="navigation">
            <h3 class="assistive-text"><?php _e( \'Main menu\', \'twentyeleven\' ); ?></h3>
            <?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?>
            <div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e( \'Skip to primary content\', \'twentyeleven\' ); ?>"><?php _e( \'Skip to primary content\', \'twentyeleven\' ); ?></a></div>
            <div class="skip-link"><a class="assistive-text" href="#secondary" title="<?php esc_attr_e( \'Skip to secondary content\', \'twentyeleven\' ); ?>"><?php _e( \'Skip to secondary content\', \'twentyeleven\' ); ?></a></div>
            <?php /* Our navigation menu. If one isn\'t filled out, wp_nav_menu falls back to wp_page_menu. The menu assigned to the primary location is the one used. If one isn\'t assigned, the menu with the lowest ID is used. */ ?>
            <?php wp_nav_menu( array( \'theme_location\' => \'primary\' ) ); ?>
        </nav><!-- #access -->
</header><!-- #branding -->
如您所见,菜单使用php。我不知道如何设计php。

谢谢

1 个回复
最合适的回答,由SO网友:Androliyah 整理而成

这就是你想要的答案吗?

转到您的.css 文件并替换此

#access {
    background: linear-gradient(rgb(37, 37, 37), rgb(10, 10, 10)) repeat scroll 0% 0% transparent;
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.4);
    clear: both;
    display: block;
    float: left;
    margin: 0px auto 6px;
    width: 100%;
}
用这个

#access {
    background: transparent;
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.4);
    clear: both;
    display: block;
    float: left;
    margin: 0px auto 6px;
    width: 100%;
}

结束

相关推荐

Wordpress Remove Submenus

我在这里找到了一个已回答的问题Remove menus and submenus 2 Answers 对于我的问题,但是否有一种方法可以稍微更改代码,以便删除所有编辑器角色的子菜单。不仅仅针对一个用户?有没有办法改进这段代码?我正在使用3.5.1 WordPress版本code that I am using: add_action(\'_admin_menu\', \'remove_editor_submenu\', 1); function remove_editor_submenu() {&