Fancybox错误:上一个和下一个区域在悬停时有黑色背景 [英] Fancybox error: prev and next areas have black background on hover

查看:73
本文介绍了Fancybox错误:上一个和下一个区域在悬停时有黑色背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我正在建造的网站上安装了一个不受干扰的Fancybox 2版本 - 除了悬停在上一个,下一个和近距离区域之外,一切都正常,图像上方会出现黑色背景。

I've installed an unmolested version of Fancybox 2 on a site I'm building - it all works fine apart from when hovering over the previous, next and close areas a black background appears over the image.

我对标准Fancybox所做的唯一修改是对fadein速度等的控制。

The only modifications I have made to the standard Fancybox are controls for the fadein speeds etc

你可以看到页面此处

如果您点击任何图片,当你将鼠标悬停在下一个/上一个/关闭按钮上时,你会看到问题。

If you click on any of the images, the you will see the issue when hovering over the next / prev / close buttons.

我在另一个网站上使用过这个并没有遇到这个问题,所以可以看看问题是什么。

I've used this on another site and haven't had this problem, so can't see what the issue is.

非常感谢任何帮助。

推荐答案

嗯,这不是fancybox错误,而是用户生成的行为。

Well, it's not a fancybox error but a user-generated behavior.

黑色区域实际上是fancybox中的一个链接,可以移动到下一个/ prev元素画廊变黑了因为您的 style.css 文件中有此CSS规则(第25行):

That black area is actually a link within fancybox to move to the next/prev elements of the gallery and becomes black because you have this CSS rule (line 25) in your style.css file :

a:link {
    color: #000000;
    text-decoration: none;
}

一般来说,将常规CSS规则应用于标记元素并不是一个好主意,因为它们会影响整个网站(就像在这种情况下一样),请使用特异性,如:

Generally speaking it's not a good idea to apply general CSS rules to tag elements because they will affect the whole site (as it does in this case), use specificity instead like :

#parent_container a:link {
    color: #000000;
    text-decoration: none;
}

a.this_class:link {
    color: #000000;
    text-decoration: none;
}

这篇关于Fancybox错误:上一个和下一个区域在悬停时有黑色背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆