javascript and css firefox issue
javascript and css firefox issue
弹出窗口在chrome中完美运行,但在Firefox中不起作用我已经给了 CSS:float:left;
但它没有得到修复
小提琴:http://jsfiddle.net/rajkumart08/s6hBG/21/
.CSS:
a{
text-decoration: none;
color: inherit;
}
.openme {
display: inline-block;
color: #fff;
background-color: #333;
padding: 10px;
}
#menu{
position: absolute;
padding: 20px 0px 0px;
background: -webkit-canvas(menu_background) no-repeat;
-webkit-transition: opacity 300ms ease-out;
-moz-transition: opacity 300ms ease-out;
}
#menu a{
float:left;
margin: 7px;
padding: 10px 20px;
font-weight: bold;
font-size: 20px;
text-align: center;
border-radius: 5px;
background-image: -webkit-gradient(linear, 0% 50%, 0% 51%, from(#fff), to(#edeff3));
background-image: -moz-linear-gradient(top, #fff, #edeff3);
}
.hide {
opacity: 0;
}
.show {
opacity: 1;
}
把它添加到你的 CSS 中:
#moz_background
{
display:none;
}
并更改此内容:
#menu{
position: absolute;
padding: 20px 0px 0px;
background: -webkit-canvas(menu_background) ;
-webkit-transition: opacity 300ms ease-out;
-moz-transition: opacity 300ms ease-out;
}
自:
#menu
{
position:absolute;
padding:20px 0px 0px;
background:-webkit-canvas(menu_background) no-repeat;
background:-moz-element(#moz_background) no-repeat;
-webkit-transition:opacity 300ms ease-out;
-moz-transition:opacity 300ms ease-out;
transition:opacity 300ms ease-out;
}
演示
这是因为 Chrome 将画布显示为 div#menu
的背景。 在 Firefox 中,实际上创建了一个canvas
元素。 因为 canvas 元素显示为 block
,所以它显示在它前面的a
元素的下方。
相关文章:
- 为什么这在IE中的工作方式与在Firefox中不同
- issue with FB.Event.subscribe
- JS可以在Chrome中工作,但不能在Firefox中工作
- createElement("a") - FireFox JavaScript
- 为什么javascript:void(0)在Firefox中不起作用
- Facebook登录按钮没有'不能在Firefox上工作
- jpm的默认Firefox路径没有'不起作用
- 重载JS'firefox中的对象原型
- Ajax调用在Firefox中不会自动响应
- JS在firefox中无法正常工作
- firefox插件和dev/panel之间的通信
- IE/Chrome中未定义的函数,但Firefox中没有
- ascii输入键通过firefox中的javascript返回0
- Jquery Colorbox issue with firefox
- Javascript firefox issue
- javascript and css firefox issue
- Firefox WebExtension - issue with browser.i18n.getMessage
- javascript issue - firefox
- Javascript / Firefox width issue
- Google Maps API v3 Firefox issue