Utilizzare RGB valori combinati con opacità per ottenere la trasparenza che desideri.
Ad esempio,
<div style=" background: rgb(255, 0, 0) ; opacity: 0.2;"> </div>
<div style=" background: rgb(255, 0, 0) ; opacity: 0.4;"> </div>
<div style=" background: rgb(255, 0, 0) ; opacity: 0.6;"> </div>
<div style=" background: rgb(255, 0, 0) ; opacity: 0.8;"> </div>
<div style=" background: rgb(255, 0, 0) ; opacity: 1;"> </div>
Analogamente, con i valori effettivi senza opacità, darà sottostante.
<div style=" background: rgb(243, 191, 189) ; "> </div>
<div style=" background: rgb(246, 143, 142) ; "> </div>
<div style=" background: rgb(249, 95 , 94) ; "> </div>
<div style=" background: rgb(252, 47, 47) ; "> </div>
<div style=" background: rgb(255, 0, 0) ; "> </div>
Si può avere uno sguardo a questo WORKING EXAMPLE.
Ora, se ci occupiamo in modo specifico del problema, ecco lo WORKING DEMO SPECIFIC TO YOUR ISSUE.
Il codice HTML
<div class="social">
<img src="http://www.google.co.in/images/srpr/logo4w.png" border="0" />
</div>
Il CSS:
social img{
opacity:0.5;
}
.social img:hover {
opacity:1;
background-color:black;
cursor:pointer;
background: rgb(255, 0, 0) ; opacity: 0.5;
}
Spero che questo aiuti adesso.
È possibile modificare l'opacità con un colore di sfondo rgb già impostato? – andufo