如何设置不透明度的div的背景颜色? [英] How to set opacity to the background color of a div?

查看:104
本文介绍了如何设置不透明度的div的背景颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个类

.box { background-color:#fff; border:3px solid #eee; }

我的问题是如何设置一个不透明度的白色背景,与我的背景?

My question is how can I set an opacity to the white background only so that it will kinda mix with my background?

谢谢。

推荐答案

rgba color ,您可以将其与图形结合使用,用于背面兼容解决方案。

CSS 3 introduces rgba colour, and you can combine it with graphics for a backwards compatible solution.

这篇关于如何设置不透明度的div的背景颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆