Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 使文本在任意背景图像上可读_Css_Twitter Bootstrap_Fonts_Carousel_Twitter Bootstrap 3 - Fatal编程技术网

Css 使文本在任意背景图像上可读

Css 使文本在任意背景图像上可读,css,twitter-bootstrap,fonts,carousel,twitter-bootstrap-3,Css,Twitter Bootstrap,Fonts,Carousel,Twitter Bootstrap 3,我正在使用新的引导程序3 RC2中的。然而,我注意到,在实践中,标题通常是不可读的,因为我的图片有很多颜色。以前的Bootstrap 2.3使用了一个,但似乎已被删除 有什么方法可以用CSS来设置我的标题样式,使它们对任意图像都可读?我尝试过使用阴影和背景色,但那会变得非常难看 下面是一些示例代码:以便在灰色半透明背景上显示内容 只需将以下代码添加到css中 .carousel-caption{ background: rgba(0,0,0,0.5); } 请看演示

我正在使用新的引导程序3 RC2中的。然而,我注意到,在实践中,标题通常是不可读的,因为我的图片有很多颜色。以前的Bootstrap 2.3使用了一个,但似乎已被删除

有什么方法可以用CSS来设置我的标题样式,使它们对任意图像都可读?我尝试过使用阴影和背景色,但那会变得非常难看


下面是一些示例代码:

以便在灰色半透明背景上显示内容

只需将以下代码添加到css中

.carousel-caption{
    background: rgba(0,0,0,0.5);
}
请看演示