我的网站地址是http://applocity.blogspot.com/与CSS转换为网站的导航栏上的Firefox
我有一个导航栏(#cssmenu如果你想找到它的源代码)和一些奇怪的原因,这是发生:我做到了,所以链接在悬停时改变颜色,并且工作正常。但我想添加一个转换,以便背景颜色通过淡入淡出来改变颜色。这在Chrome上运行良好,但只适用于Firefox上的子链接(例如设备和类别下)。我一直无法弄清楚为什么会发生这种情况。
#cssmenu a {
background: #999999;
color: #FFF;
-webkit-transition: background 1s ease;
-moz-transition: background 1s ease;
-ms-transition: background 1s ease;
-o-transition: background 1s ease;
transition: background 1s ease;
padding: 0px 25px;
//border-radius: 5px; (NOT ACTIVE)
}
#cssmenu ul li:hover > a {
background: #66FF99;
color: #000000;
-webkit-transition: background-color 0.3s ease;
-moz-transition: background-color 0.3s ease;
-ms-transition:background 0.3s ease;
-o-transition: background-color 0.3s ease;
transition: background-color 0.3s ease;
}
(有更多的网站的源代码 - CTRL + F #cssmenu)
我试过到目前为止:
- 把代替背景颜色背景
- 使用-moz-transition ...当然
- 重新排序并放置在CSS代码中的转换属性(例如在#cssmenu以及#cssmenu:hover中)
你声明一个HTML5的doctype?不知道这是否会做任何事情。 – 2013-02-21 01:12:53
对于这种有趣的东西,jQuery非常适合完整的跨浏览器兼容性! – LazerSharks 2013-02-21 01:51:13
你为什么用'span'包裹'a'? – 2013-02-21 04:09:41