Loading...

Bootstrap 4 navbar and React Router v4


This is code navbar boostrap 4 have dropdown menu

 <div className="collapse navbar-collapse navbar-ex1-collapse">
                        <ul className="nav navbar-nav">
                                <li className="dropdown active">
                                    <a href="#" className="dropdown-toggle" data-toggle="dropdown">Record<b className="caret" /></a>
                                    <ul className="dropdown-menu">
                                        <li><Link to= "/import">import</Link></li>
                                        <li><Link to= "/export">export</Link></li>
                                    </ul>
                                </li>
                                <li className="dropdown ">
                                    <a href="#" className="dropdown-toggle" data-toggle="dropdown">Account<b className="caret" /></a>
                                    <ul className="dropdown-menu">
                                        <li><Link to= "/info">Account info</Link></li>
                                        <li><Link to= "/setting">Settingac</Link></li>
                                    </ul>
                                </li>

                        </ul>

                    </div>

How can I style active link in <li className="dropdown"> ?

- - Source
comments powered by Disqus