Это то, что я смог написать за несколько минут.
Вы можете поиграть с рамкой или цветом, пожалуйста, обратитесь к документации jQuery для получения дополнительной информации о animate (например, вы не можетеанимируйте цвет границы, если вы не используете плагин и не имеете оживленного эффекта
$('.style_logo_position_extra_logo').mouseover(function(){
$('<div/>')
.width($(this).outerWidth())
.height($(this).outerHeight())
.offset($(this).offset())
.css({
'border-width':'2px',
'border-style':'double',
'border-color':$(this).css('border-color'),
'position':'absolute',
'borderTopLeftRadius': $(this).css('borderTopLeftRadius'),
'borderTopRightRadius': $(this).css('borderTopRightRadius'),
'borderBottomLeftRadius': $(this).css('borderBottomLeftRadius'),
'borderBottomRightRadius': $(this).css('borderBottomRightRadius'),
'WebkitBorderTopLeftRadius': $(this).css('WebkitBorderTopLeftRadius'),
'WebkitBorderTopRightRadius': $(this).css('WebkitBorderTopRightRadius'),
'WebkitBorderBottomLeftRadius': $(this).css('WebkitBorderBottomLeftRadius'),
'WebkitBorderBottomRightRadius': $(this).css('WebkitBorderBottomRightRadius'),
'MozBorderRadius': $(this).css('MozBorderRadius')
})
.appendTo('body')
.animate({
'border-width':'6px',
'opacity':0.25,
'width':'+=6', //use even numbers if possible
'height':'+=6',
'left':'-=8', //-((+width/2) + (delta border) +1) = -((+6/2) + (6-2)+1) =-8
'top':'-=8',
'borderTopLeftRadius': '+=6',
'borderTopRightRadius': '+=6',
'borderBottomLeftRadius': '+=6',
'borderBottomRightRadius': '+=6',
'WebkitBorderTopLeftRadius': '+=6',
'WebkitBorderTopRightRadius': '+=6',
'WebkitBorderBottomLeftRadius': '+=6',
'WebkitBorderBottomRightRadius': '+=6',
'MozBorderRadius': '+=6'
},500, 'linear',function(){
$(this).remove();
})
;
})
Я собираюсь использовать его на своем сайте