title: CSS Dark Opacity
body: <p>Is it possible to keep the background dark while adding opacity? I'm trying to create an input that looks like the image added. Every time I set the background to #000 and add opacity, the background starts to turn gray instead of staying black and becoming transparent.</p>
  
  <p><a href="https://i.stack.imgur.com/JOPA4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JOPA4.png" alt="enter image description here"></a></p>
  
  <p>Edit:</p>
  
  <p>For everyone telling me to use:</p>
  
  <pre><code> background: rgba(0,0,0, 0.5);
  </code></pre>
  
  <p>This is the result (doesn't work)<a href="https://i.stack.imgur.com/daRD9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/daRD9.png" alt="enter image description here"></a> </p>
  
  <p>Edit 2:</p>
  
  <p>Here is a fiddle - <a href="http://jsfiddle.net/n7aob2yd/1/" rel="nofollow noreferrer">http://jsfiddle.net/n7aob2yd/1/</a></p>