firefox翱翔不透明 [英] firefox hover opacity

查看:136
本文介绍了firefox翱翔不透明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法获得悬停不透明度更改在Firefox或IE。它的工作在chrome。 Firefox和IE能够使用.move中定义的不透明度初始状态,但不是悬停。有任何想法吗。

I can't get hover opacity to change in firefox or IE. it's working in chrome. Firefox and IE is able to work with opacity initial state as defined in .move, but just not on hover. Any ideas.

<style>
.move{
  width:100px;
  height:100px;
  background-color:red;
  opacity:0.2;
  filter:alpha(opacity=20);
  }
.move:hover{
  opacity:1;
  filter:alpha(opacity=100);
  }
</style>

<div class="move"></div>


推荐答案

这是一个错误: http://support.mozilla.com/pa-IN/questions/746770

快速修复正在替换:

.move:hover{

[class="move"]:hover{

使用 http://www.xs4all.nl/~peterned/csshover.html 来处理IE怪癖。

最终代码是

<style>
 body {
  behavior:url('csshover3.htc');
 }

.move{
  width:100px;
  height:100px;
  background-color:red;
  opacity:0.2;
  filter:alpha(opacity=20);
  -moz-opacity:0.2;
  -khtml-opacity: 0.2;
  }
.move:hover{
  opacity:1;
  filter:alpha(opacity=100);
  -moz-opacity:1.0;
  -khtml-opacity: 1.0;
  }
[class="move"]:hover{
  opacity:1;
  filter:alpha(opacity=100);
  -moz-opacity:1.0;
  -khtml-opacity: 1.0;
  }
</style>

<div class="move"></div>

您需要添加-moz-opacity和-khtml-opacity才能支持webkit和旧的firefox安装。

You need to add -moz-opacity and -khtml-opacity to support webkit and older firefox installations.

这篇关于firefox翱翔不透明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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