【问题标题】:jquery not method for opacityjquery不是不透明度的方法
【发布时间】:2014-05-07 19:32:16
【问题描述】:

我无法在 ie8 浏览器中看到不透明度... 我认为这是因为 jquery 中的 not 方法.... 你们能告诉我如何解决它.. 在下面提供我的代码...

也提供我的小提琴

function soccerMatches(matches) {
    var $cricket = $('.color'),
        matchesIds = [],
        $soccers;

    $.each(matches, function(i, match) {
        matchesIds.push('#cricket' + match.title);
    });

    $soccers = $(matchesIds.join(', '));

    $cricket.not($soccers).addClass("testing1");
    $soccers.css('opacity', 1);

}

.testing1 {

    opacity: 0.33;
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=33)";

}

【问题讨论】:

  • 你没有设置 ms 过滤器...
  • 您是否对 $soccers 的不透明度有问题?该变量似乎是一个字符串,而不是一个 DOM 元素。您是否有一些示例数据可以显示它的作用?
  • @Pow-Ian: 也添加了我的小提琴
  • @epascarello: 你能在我的小提琴中更新吗

标签: javascript jquery css jquery-ui javascript-events


【解决方案1】:

试试这个:

.testing1 {
    -moz-opacity: 0.33;
    opacity:.33;
    filter: alpha(opacity=33);
    filter:progid:DXImageTransform.Microsoft.Alpha(opacity=33);
}

但您需要知道 IE 不会对没有布局的元素应用多种样式。

欲了解更多信息:http://www.satzansatz.de/cssd/onhavinglayout.html

【讨论】:

    猜你喜欢
    • 2017-01-11
    • 2013-05-01
    • 1970-01-01
    • 2023-03-11
    • 2010-12-12
    • 2010-12-05
    • 2012-12-08
    • 2011-09-20
    • 2011-07-22
    相关资源
    最近更新 更多