开发者

How can I make a background transparent using css?

开发者 https://www.devze.com 2023-03-11 07:00 出处:网络
How开发者_运维百科 can I add a background image to an element and make it transparent?CSS doesn\'t provide a way to add translucency to just a background image.

How开发者_运维百科 can I add a background image to an element and make it transparent?


CSS doesn't provide a way to add translucency to just a background image.

You can use the opacity property to make the entire element (content and children included) translucent.

You can use rgba() colour values to make a plain background translucent.

If you want a translucent background image, your best bet is to edit the image itself (and save it in a format that supports translucency, such as PNG).


Did you mean the alpha() and opacity() property?
Take a look here http://www.w3schools.com/css/css_image_transparency.asp

0

精彩评论

暂无评论...
验证码 换一张
取 消