在一页wordpress上保持活跃的css菜单

时间:2017-10-17 17:03:12

标签: javascript css onepage-scroll

我想在一个wordpress网站的相关部分保留菜单状态活动。目前我有这个代码,并且活跃但不保持:

"MyApp": {
      "commandName": "Project",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "applicationUrl": "http://localhost:53348/"
}

这是标题:

.navbar-nav > li.chisiamo a:hover{ color:#80b087!important; font-weight:light!important;}
.navbar-nav > li.atta a:hover{ color:#b07988!important; font-weight:light!important;}
.navbar-nav > li.worklnk a:hover{ color:#13806e!important; font-weight:light!important;}
.navbar-nav > li.networklnk a:hover{ color:#8b566d!important; font-weight:light!important;}
.navbar-nav > li.contti a:hover{ color:#41473e!important; font-weight:light!important;}
.navbar-nav > li a:active{  font-weight:bold!important;}

这是脚本但不起作用。我丢失了这项工作的原始剧本

$(document).ready(function(){     $(document).on(" scroll",onScroll);

<header>
        <nav class="navbar navbar-default">
            <div class="container-fluid">
                <!-- Brand and toggle get grouped for better mobile display -->
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                                                <a class="navbar-brand" href="http://ergoncom.com/it/">
                            <img src="http://ergoncom.com/wp-content/uploads/2017/03/logo.png" alt=""/>
                    </a>
                </div>
                                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav navbar-right">
                                            <li class="chisiamo">
                        <a href="http://ergoncom.com/it/#about_us">CHI SIAMO</a>
                    </li>
                                            <li class="atta">
                        <a href="http://ergoncom.com/it/#activity">ATTIVITÀ</a>
                    </li>
                                            <li class="worklnk">
                        <a href="http://ergoncom.com/it/#works">WORKS</a>
                    </li>
                                            <li class="networklnk">
                        <a href="http://ergoncom.com/it/#network">NETWORK</a>
                    </li>
                                            <li class="contti">
                        <a href="#contactus">CONTATTI</a>
                    </li>
                                        <li class="lstlnk">
<aside id="secondary" class="widget-area" role="complementary">
<style type="text/css">
.qtranxs_widget ul { margin: 0; }
.qtranxs_widget ul li
 {
display: inline; /* horizontal list, use "list-item" or other appropriate value for vertical list */
list-style-type: none; /* use "initial" or other to enable bullets */
margin: 0 5px 0 0; /* adjust spacing between items */
opacity: 0.5;
-o-transition: 1s ease opacity;
-moz-transition: 1s ease opacity;
-webkit-transition: 1s ease opacity;
transition: 1s ease opacity;
}
.qtranxs_widget ul li.active { opacity: 0.8; }
.qtranxs_widget ul li:hover { opacity: 1; }
.qtranxs_widget img { box-shadow: none; vertical-align: middle;
display: initial; }
.qtranxs_flag { height:12px; width:18px; display:block; }
.qtranxs_flag_and_text { padding-left:20px; }
.qtranxs_flag span { display:none; }
</style>
<section id="qtranslate-2" class="widget qtranxs_widget">
<ul class="language-chooser language-chooser-custom qtranxs_language_chooser" id="qtranslate-2-chooser">
<li class="language-chooser-item language-chooser-item-it active"><a href="http://ergoncom.com/it/" title="Italiano (it)">it </a></li>
<li class="language-chooser-item language-chooser-item-en"><a href="http://ergoncom.com/en/" title="English (en)">en </a></li>
</ul><div class="qtranxs_widget_end"></div>
</section></aside><!-- #secondary -->
</li>
</ul>
            </div>                    
        </nav>
    </header>

0 个答案:

没有答案