【问题标题】:fancybox and transparent background image花式框和透明背景图像
【发布时间】:2021-03-14 00:08:27
【问题描述】:

我正在使用fancybox显示png图像...它是透明背景,但运行代码时出现边框

如何移除或隐藏我的 png 图像周围的边框(查看屏幕截图)?

我的 CSS

.fancybox-content {
       background: transparent;
        
    }

我的代码

$(document).ready(function() {
        $.fancybox.open('<div class="message"><a href="http://google.com"><img src="fotoTiendas/Captura.jpg" id="imgx"></a></div>');
        
    });

非常感谢

【问题讨论】:

  • .fancybox-content {border:none !important; }
  • 谢谢,但没用
  • .fancybox-content { 大纲:无!重要; }
  • :( 它仍然不起作用......谢谢......顺便说一下,如果我删除 标签,边框会消失......但我需要链接图片...我该怎么办?

标签: jquery css image png fancybox


【解决方案1】:
a {
  outline: none;
}

a:focus {
  outline: outline of your choice
}

来自 MDN 网络文档:

无障碍问题 为轮廓分配值 0 或无将删除浏览器的默认焦点样式。如果一个元素可以与之交互,它必须有一个可见的焦点指示器。如果删除了默认焦点样式,请提供明显的焦点样式。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-11-15
    • 2016-12-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-15
    • 1970-01-01
    相关资源
    最近更新 更多