Transparent background, opaque elements
问题 I want to have an image background on body and a semitransparent background on main div , so that the image can be seen through it, but shaded. However, the easiest body { background-image: ... } #main { background-color: #999; opacity: 0.9 } will also make everything within #main to be opaque as well, such as any contained img . How do you do what I describe? Thanks 回答1: rgba helps you, but it is not supported by all browsers usage: rgba(a,b,c,d), where a = red(0-255); b = green(0-255); c =