title: Creating a 2-level navigation bar
body: <p>I would like to create a 2-level navigation with delay effect when hovering.</p>
  
  <blockquote>
    <p>in css Where to put <code>transition</code>?</p>
  </blockquote>
  
  <p>here is the snippet code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>@import url('https://fonts.googleapis.com/css?family=Quicksand&amp;subset=latin-ext');
  body {
    background: #ADAEAE;
    box-sizing: border-box;
    color: white;
    font-family: 'Quicksand';
    margin: 0;
  }
  
  nav {
    background: #222122;
    width: 100%;
    text-align: center;
    position: fixed;
  }
  
  nav ul {
    padding: 0;
    margin: 0;
    list-style: none;
  }
  
  nav ul li {
    display: inline-block;
  }
  
  nav ul a {
    display: inline-block;
    height: 50px;
    line-height: 50px;
    padding: 0 10px;
    color: white;
    text-decoration: none;
  }
  
  nav ul a:hover {
    background-color: #404040;
    transition: all 1s;
  }
  
  nav ul ul li {
    display: block;
  }
  
  nav li ul {
    display: none;
    position: absolute;
    background: #222122;
  }
  
  nav li:hover ul {
    display: block;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!doctype html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;title&gt;Dokument bez tytułu&lt;/title&gt;
    &lt;link rel="stylesheet" href="style.css" type="text/css"&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;nav&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href="#"&gt;About&lt;/a&gt;
  
          &lt;ul&gt;
            &lt;li&gt;&lt;a href="#"&gt;About2&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#"&gt;About3&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#"&gt;About4&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li&gt;&lt;a href="#"&gt;Offer&lt;/a&gt;
          &lt;ul&gt;
            &lt;li&gt;&lt;a href="#"&gt;Offer2&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#"&gt;Offer3&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#"&gt;Offer4&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li&gt;&lt;a href="#"&gt;Contact&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/nav&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>