【问题标题】:change colour of shadow behind image in magnfic popup在放大的弹出窗口中更改图像后面的阴影颜色
【发布时间】:2017-09-05 14:50:11
【问题描述】:

我正在尝试更改放大弹出窗口中图像背后阴影的不透明度和潜在颜色。我尝试过使用弹出窗口的 css。通过更改背景中的#number。无济于事。请帮忙 。我正在使用引导程序作为框架。 这是 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; }

【问题讨论】:

  • 阴影颜色由box-shadow 属性值中的rgba(0, 0, 0, 0.6); 定义,改变红色、绿色和蓝色分量(前三个0 值)可能会改变颜色.
  • 谢谢。但我似乎无法让它工作。我只想要纯黑色背景和 100% 不透明。谢谢。

标签: jquery html css twitter-bootstrap magnific-popup


【解决方案1】:

通过修改 box-shadow 属性,您可以更改或更改此弹出窗口的颜色。只需将 box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); 替换为 rgba(0, 0, 0, 1) 即可,这应该可以满足您的要求。

【讨论】:

    猜你喜欢
    • 2012-05-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-09-22
    • 1970-01-01
    • 2019-11-02
    • 1970-01-01
    • 2018-12-02
    相关资源
    最近更新 更多