CSS twitter bootstrap - 背景色很好
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22915469/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
twitter bootstrap - well background color
提问by richbray89
I'm trying to change the background color and opacity of a bootstrap well. I've got the following CSS:
我正在尝试更改引导程序的背景颜色和不透明度。我有以下 CSS:
.well {
opacity: 0.9; /* opacity [0-1] */
-moz-opacity: 0.9; /* opacity [0-1] */
-webkit-opacity: 0.9; /* opacity [0-1] */
background-color: blue;
}
The opacity is working, but the background-color does not seem to change. Any ideas?
不透明度有效,但背景颜色似乎没有改变。有任何想法吗?
Edit fiddleadded in case you want a play-a-round
编辑小提琴以防万一你想要一个回合
回答by richbray89
Or you could write it in one line of css as rgba.
或者你可以将它写在一行 css 中作为 rgba。
.well{
background: rgba(0, 0, 255, 0.9);
}