开发者

Is there a way to control opacity/transparency of the border color using CSS?

开发者 https://www.devze.com 2023-01-06 08:24 出处:网络
Is there a way to control opacity/transparency 开发者_如何学Pythonof the border color using CSS?You may try rgba color

Is there a way to control opacity/transparency 开发者_如何学Pythonof the border color using CSS?


You may try rgba color

border-color: rgb(255,255,255); /* fallback for IE */
border-color: rgba(255,255,255, 0.4); /* RGBA for the ones supporting it */

The last one is the (alpha) opacity. But it's not supported in IE, that's why you need a fallback version


Try border: 5px solid rgba(255,0,0,0.5); -- the alpha channel is the last parameter.

NOTE: Not all browsers (read: Internet Explorer) support this.

0

精彩评论

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