title: How to apply parallax in a background image
body: <p>I have two blocks in which I have given a background image with <code>background-size: cover</code>. Now I want it to make it parallax. </p>
  
  <p>Following is my code :</p>
  
  <p><code>HTML</code>:</p>
  
  <pre><code>&lt;div class="personalSessDiv"&gt;
      &lt;div class="pi-section"&gt;
              My content
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="betterGradDiv"&gt;
      &lt;div class="pi-section"&gt;
              My content
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><code>CSS</code>:</p>
  
  <pre><code>.personalSessDiv{
      background: url(../images/common/home-bg-2.jpg) no-repeat;
      background-size: cover;
      height: 392px;
  }
  .betterGradDiv{
      background: url(../images/common/home-bg-3.jpg) no-repeat;
      background-size: cover;
      height: 453px;
  }
  </code></pre>