小编nag*_*ing的帖子

Jquery在悬停时增加div大小?

如何在悬停时增加div大小?每个div都有相同的类名,它是动态创建的.我试过这段代码:

<script type="text/javascript">
$('.resultitem').bind('mouseover', function() {
    $(this).addClass('hovers');
    $('.resultitem').not('.hover').css({ opacity: 0.3 });
});
$('.resultitem').bind('mouseout', function() {
    $('.resultitem').removeClass('hovers').fadeTo('normal',1);
});
</script>

<style type="text/css">
.hovers {
    width:300px;
    height:400px;
}
img.hovers {
    width:300px;
    height:300px;
}
</style> 
Run Code Online (Sandbox Code Playgroud)

它改变了其他div的对齐方式?

css jquery css3

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

css ×1

css3 ×1

jquery ×1