, , .
, - , - :
semitransparent = "images/white50.png"; //a 1x1 pixel image, white at 50% transparency.
myElement.style.backgroundImage = "url('"+semitransparent+"'), url('"+backgroundImage+"')";
This example assumes that you usually view the white background of the page; you may want to change the color of the translucent image if you are trying to simulate translucency with some other color, partially skipping through.
source
share