[英]Transparent image - background color
I'm wondering if it is possible to set a background color for transparent images? 我想知道是否可以为透明图像设置背景颜色? (only the image will have background color)
(只有图像会有背景色)
If I understand you right, you can do this: 如果我理解你,你可以这样做:
<img src="image.png" style="background-color:red;" />
In fact, you can even apply a whole background-image
to the image, resulting in two "layers" without the need for multi-background support in the browser ;) 实际上,您甚至可以将整个
background-image
应用于图像,从而产生两个“层”,而无需在浏览器中支持多背景;)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.