鼠标经过图片放大JS特效问题

jackykwan4343 2012-11-28 02:33:06
我的JS代码如下所示:

$(function(){
//Larger thumbnail preview
$(".indexscell").hover(function() {
$(this).css({'z-index' : '10000'});
$(this).find('img').addClass("hover").stop().animate({
marginTop: '0px',
marginLeft: '-30px',
top: '20%',
left: '20%',
width: '140px',
height: '140px',

}, 200);
} , function() {
$(this).css({'z-index' : '0'});
$(this).find('img').removeClass("hover").stop().animate({
marginTop: '30px',
marginLeft: '0',
top: '0',
left: '0',
width: '80px',
height: '80px',

}, 400);
});
});


这个效果应该是鼠标经过图片,图片放大。
在chrome、360和IE8以上都没问题,但是在IE6下没效果为什么呢?
...全文
178 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
jackykwan4343 2012-11-29
  • 打赏
  • 举报
回复
引用 1 楼 showbo 的回复:
JavaScript code?1234567891011121314151617181920212223242526$(function(){//Larger thumbnail preview $(".indexscell").hover(function() { $(this).css({'z-index' : '1000……
QQLeYuanWang 2012-11-29
  • 打赏
  • 举报
回复
Go 旅城通票 2012-11-29
  • 打赏
  • 举报
回复
$(function(){
//Larger thumbnail preview 
          $(".indexscell").hover(function() {
             $(this).css({'z-index' : '10000'});
             $(this).find('img').addClass("hover").stop().animate({
                   marginTop: '0px', 
                   marginLeft: '-30px', 
                   top: '20%', 
                   left: '20%', 
                   width: '140px', 
                   height: '140px'//,/////多了一个逗号,IE8-不识别这种json数据报错了
                      
             }, 200);
          } , function() {
             $(this).css({'z-index' : '0'});
             $(this).find('img').removeClass("hover").stop().animate({
                   marginTop: '30px', 
                   marginLeft: '0',
                   top: '0', 
                   left: '0', 
                   width: '80px', 
                   height: '80px'//,/////多了一个逗号,IE8-不识别这种json数据报错了
                      
             }, 400);
          });
});

5,006

社区成员

发帖
与我相关
我的任务
社区描述
解读Web 标准、分析和讨论实际问题、推动网络标准化发展和跨浏览器开发进程,解决各种兼容性问题。
社区管理员
  • 跨浏览器开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧