PPT怎么让鼠标划过图片就放大?

发布网友 发布时间:2022-04-20 21:45

我来回答

1个回答

热心网友 时间:2022-04-22 02:28

//以下代码需要jquery.js
$.fn.floatWith = function(obj,idx){
idx = typeof(idx)!='number' || !idx ? 0 : idx;
var elem = $(obj),offset = elem.offset(),_top = offset.top,_left =offset.left,width = elem.outerWidth(),height=elem.outerHeight();
var floatWidth = this.outerWidth(), floatHeight = this.outerHeight(), cssPos = null;
switch(idx){
case 0: cssPos = {top:_top+height,left:_left}; break;
case 1: cssPos = {top:_top+height,left:_left+width}; break;
case 2: cssPos = {top:_top,left:_left+width}; break;
case 3: cssPos = {top:_top-floatHeight,left:_left+width}; break;
case 4: cssPos = {top:_top-floatHeight,left:_left}; break;
case 5: cssPos = {top:_top-floatHeight,left:_left-floatWidth}; break;
case 6: cssPos = {top:_top,left:_left-floatWidth}; break;
case 7: cssPos = {top:_top+height,left:_left-floatWidth}; break;
default:cssPos = {top:_top+height,left:_left}; break;
}
this.eq(0).css({'position':'absolute'}).css(cssPos).hide().show(200);
return this;
};

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com