0

简单但具体的问题。我有一个使用 Pixastic 模糊图像的网站。页面上有两个图像需要进行模糊处理。这似乎在 IE 中运行良好(我相信它在图像上使用过滤器)但在其他浏览器(Firefox/Chrome)上不起作用。在那些浏览器中,它只会影响第二个图像,而第一个被什么都替换 - 所以我只得到一个渲染页面,上面有一个模糊图像而不是两个。

顺便说一句,我正在使用 jQuery 选择器。我使用的代码基本上就是这样的:

<head>
<script type="text/javascript" src="js/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="js/pixastic.custom.js"></script>
<script type="text/javascript">
  $(document).ready(function() {
    $('.blur').pixastic('blurfast', {amount:0.2});
  });
</script>
</head>

<body>
  <img src="img/title1.png" title="" class="blur" />
  <img src="img/title2.png" title="" class="blur" />
</body>

有谁知道是否可以使用 Pixastic 影响多个图像,如果可以,如何?

谢谢

4

1 回答 1

1

据我所知,你所拥有的应该可以工作。

选项 2. 尝试显式指定 CSS 类?

例如大致类似于:

<html>
<head>
<script type="text/javascript">
var pixastic_parseonload = true;
</script>
<script src="pixastic.core.js" type="text/javascript"></script>
<script src="invert.js" type="text/javascript"></script>
</head>
<body>
</style>
  <img src="img/title1.png" title="" class="pixastic pixastic-blurfast(amount=0.2)" />
  <img src="img/title2.png" title="" class="pixastic pixastic-blurfast(amount=0.2)" />
</body>
</html>
于 2011-06-09T11:27:50.577 回答