title: How to keep the background color persistent in css active?
body: <p>I have a image, when user clicks on it I am changing the background color of it. for ex:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;img src="images/image1.png" /&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>img:active{
      background-color:red;
  }
  </code></pre>
  
  <p>But the red color is not persistent. and the red color is replaced with the old color. How can I make it persistent ?</p>