There is a code:

.background { background-color: red; opacity: 0.3; } 
 <div id="test"> <div id="test2"> <div class="test3"> <div class='background'> <span class="test4">lorumsukaipsum</span><span class="test5">ipsumblya</span> </div> </div> </div> </div> 

How can I set opacity: 0.1 for class background without changing the transparency of the text?

    1 answer 1

     background: rgba(255,255,255,0.1); 
    • Exactly, thanks! - aloe
    • one
      For red background: rgba (255,0,0,0.1); - slake
    • one
      @aloe, if this answer helped you, mark it as correct - Yuri
    • @Yuri Couldn’t do this a couple of minutes ago, but now everything is OK! - aloe