<! DOCTYPE Html>"en"> <meta charset="UTF-8"> <title></title> <style> *{margin:0px;padding:0px;} Li{list-style:none;width:200px;height:30px;} A{color: # the; text-decoration:none;display:block;width:200px;height:30px;text-align:center;line-height:30px;} . Active{background-color:blue; color: #fff; animation:move 1s;} @-webkit-keyframes move{ from{background-color: #fff; color:# the;} To{background-color:blue;color: #fff;} }. nav{Position:fixed; top:300px; left:100px;width:200px;height:90px;border:1px solid #eee; border-radius:5px;} </style> <script src="Http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script> <script>$ (function () {$ (window). Scroll (function () {//varwin=$ (window). scrolltop ()//Gets the distance from the top of the document on the upper edge of the windowvarDoc=$ (document). Height ();//Get Document HeightsvarH=$ (window). height ();//Gets the height of the windowvara=$ ("#a"). Offset (). top;//gets the distance from the top of the document to the navigation corresponding contentvarb=$ ("#b"). Offset (). Top; varc=$ ("#c"). Offset (). Top; if(Win<= (A + -)){ $(". One"). AddClass ("Active"). Parent (). siblings (). Children (). Removeclass ("Active") }Else if(Win>= (A + -) &&win<= (b + -)){ $(". the"). AddClass ("Active"). Parent (). siblings (). Children (). Removeclass ("Active") }Else if(win>= (b + -)|| win== (doc-H)) { $(". Three"). AddClass ("Active"). Parent (). siblings (). Children (). Removeclass ("Active"); } }) }) </script>"Scroll"data-target="#myScrollspy"><divclass="Container"> <divclass="Row"> <ulclass="nav"> <li ><a href="#a" class="One active"> First part </a></li> <li><a href="#b" class=" Both"> Part II </a></li> <li><a href="#c" class="three"> Part III </a></li> </ul> <DIVclass="col-xs-12"> "a"Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Federation Federation Alliance Federation Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Alliance Union Alliance Alliance Alliance Union Alliance Alliance Alliance Alliance Alliance Alliance </p> <br/> <br/> <br/> <br/& Gt <br/> <br/> <br/> <br/> <br/> <br/ > <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <b r/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br /> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> < br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> &L t;br/> <br/> <br/>
"b"> Tribes tribal Tribal tribes tribal tribes tribal tribes tribal tribes tribal tribes tribal tribal tribes tribal tribes tribe tribe tribal tribes tribal tribes tribe tribes tribal tribes tribe Horde clan tribesmen, tribal tribes tribes tribe tribal tribes tribal tribes tribe tribe tribal tribes, tribal tribes tribal tribes </p > <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <b r/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> < ;br/> <br/> <br/> <br/> <br/> <br/> ; <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> &L t;br/> <br/> <br/>
"C"> Neutrality Neutral Neutral neutral neutral neutral neutral neutral neutral neutral neutrality neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutrality neutral neutral neutral neutral neutral neutral neutrality neutral neutral neutral neutral neutral neutral neutral neutrality Neutral neutral neutral neutrality neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutrality neutral neutral neutral neutral neutral neutral neutral neutral neutral neutrality neutral neutral neutral neutral neutral neutral neutral Neutral neutral neutral neutrality neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutral neutrality neutral neutral neutrality neutral neutral neutral neutral neutral</p> <br/> <br/> <br/> <br/> <br/& Gt <br/> <br/> <br/> <br/> <br/> <br/ > <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <b r/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> < ;br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> < ;br/> </div> </div></div></body>
Additional navigation examples