Animated 'X' icon for bootstrap toggle
<p>I am attempting to animate the horizontal lines in the navbar to an 'X' when the page is reduced in size.</p>

<p>My navbar code is as follows:</p>

<pre><code>&lt;nav class="navbar navbar-default navbar-fixed-top" role="navigation"&gt;
        &lt;div class="container"&gt;
            &lt;!-- Brand and toggle get grouped for better mobile display --&gt;
            &lt;div class="navbar-header"&gt;
                &lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"&gt;
                    &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt;
                    &lt;span class="icon-bar"&gt;&lt;/span&gt;
                    &lt;span class="icon-bar"&gt;&lt;/span&gt;
                    &lt;span class="icon-bar"&gt;&lt;/span&gt;
                &lt;/button&gt;
                &lt;a class="navbar-brand" href="index.html"&gt;Company&lt;/a&gt;
            &lt;/div&gt;
            &lt;!-- Collect the nav links, forms, and other content for toggling --&gt;
            &lt;div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"&gt;
                &lt;ul class="nav navbar-nav navbar-right"&gt;
                    &lt;li class="dropdown"&gt;
                        &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown"&gt;About&lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;
                        &lt;ul class="dropdown-menu"&gt;
                            &lt;li&gt;
                                &lt;a href="about.html"&gt;About Us&lt;/a&gt;
                            &lt;/li&gt;
                            &lt;li&gt;
                                &lt;a href="certification.html"&gt;Certification&lt;/a&gt;
                            &lt;/li&gt;
                            &lt;li&gt;
                                &lt;a href="downloads.html"&gt;Download PDF&lt;/a&gt;
                            &lt;/li&gt;
                        &lt;/ul&gt;
                    &lt;/li&gt;
                    &lt;li&gt;
                        &lt;a href="products.html"&gt;Products&lt;/a&gt;
                    &lt;/li&gt;
                    &lt;li&gt;
                        &lt;a href="inquiry.html"&gt;Inquiry&lt;/a&gt;
                    &lt;/li&gt;
                    &lt;li&gt;
                        &lt;a href="events.html"&gt;Events&lt;/a&gt;
                    &lt;/li&gt;
                    &lt;li&gt;
                        &lt;a href="contact.html"&gt;Contact&lt;/a&gt;
                    &lt;/li&gt;
                    &lt;li&gt;
                        &lt;a href="#"&gt;Login&lt;/a&gt;
                    &lt;/li&gt;
                &lt;/ul&gt;
            &lt;/div&gt;
            &lt;!-- /.navbar-collapse --&gt;
        &lt;/div&gt;
        &lt;!-- /.container --&gt;
    &lt;/nav&gt;
</code></pre>

<p>When I attempt to use the CSS shown <a href="http://julienmelissas.com/animated-x-icon-for-the-bootstrap-navbar-toggle/" rel="noreferrer">here</a> it does not work. Is there something I need to modify for my navbar specifically? I also notice that when I add the css, the :</p>

<pre><code> &amp;:hover {
    background: transparent !important;
  }
</code></pre>

<p>the closing curly brace does not recognize the opening one. What am i missing?</p>