How to set transparent background in HTML5 element
This question already has an answer here:
经过一番研究,我发现一个简单的答案 - background-color: transparent;
你可以设置背景颜色吗?
background-color: rgba(255,255,255,0.6);
The opacity property is applied across an entire object, as you can read on the specification for it.
The uniform opacity setting to be applied across an entire object. Any values outside the range 0.0 (fully transparent) to 1.0 (fully opaque) will be clamped to this range. If the object is a container element, then the effect is as if the contents of the container element were blended against the current background using a mask where the value of each pixel of the mask is .
You can consider using rgba()
colors.
上一篇: CSS:不透明只有背景,不是里面的文字
下一篇: 如何在HTML5元素中设置透明背景