2017-09-05 85 views
1

我想改变不透明度和潜在的颜色,在一个图像后面的巨大弹出窗口中。我试着玩弄弹出的CSS。通过更改背景中的#号。无济于事。请帮忙 。我使用bootstrap作为框架。 这里是CSS:改变后面的图像中的影子在颜色弹出式窗口中的颜色

/* The shadow behind the image */ 
.mfp-figure { 
    line-height: 0; } 
    .mfp-figure:after { 
    content: ''; 
    position: absolute; 
    left: 0; 
    top: 40px; 
    bottom: 40px; 
    display: block; 
    right: 0; 
    width: auto; 
    height: auto; 
    z-index: -1; 
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); 
    background: #444; } 
    .mfp-figure small { 
    color: #BDBDBD; 
    display: block; 
    font-size: 12px; 
    line-height: 14px; } 
    .mfp-figure figure { 
    margin: 0; } 
+0

阴影颜色由'box-shadow'属性值中的'rgba(0,0,0,0.6);'定义,改变红色,绿色和蓝色分量(前三个'0'值)可能会改变颜色。 –

+0

谢谢你。但我似乎无法让它工作。我只想要纯黑色背景和100%不透明。谢谢。 – Ddavis

回答

0

通过修改box-shadow属性,您可以更改或修改此弹出的颜色。简单地用rgba(0, 0, 0, 1)代替box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);,这应该做你想要完成的事情。