jsp中,鼠标放到图片上,图片会变大的代码,保证其它的图片不动,用什么方法都可以?
例如:http://image.baidu.com/i?tn=baiduimage&ct=201326592&lm=-1&cl=2&nc=1&word=%E9%BC%A0%E6%A0%87%E6%94%BE%E5%88%B0%E5%9B%BE%E7%89%87%E4%B8%8A%2C%E5%9B%BE%E7%89%87%E4%BC%9A%E5%8F%98%E5%A4%A7%E7%9A%84%E4%BB%A3%E7%A0%81&ie=utf-8
这个效果演示。
鼠标放到图片上,图片会变大的代码,保证其它的图片不动
答案:2 悬赏:20 手机版
解决时间 2021-04-13 07:00
- 提问者网友:十年饮冰
- 2021-04-12 19:34
最佳答案
- 五星知识达人网友:洒脱疯子
- 2021-04-12 20:56
tu_mc.onRollOver = function() {
tu_mc.onEnterFrame = function() {
tu_mc._xscale += (200-tu_mc._xscale)/4;
tu_mc._yscale += (200-tu_mc._yscale)/4;
if (tu_mc._yscale>=200) {
delete tu_mc.onEnterFrame;
}
};
};
tu_mc.onRollOut = function() {
tu_mc.onEnterFrame = function() {
tu_mc._xscale -= (tu_mc._xscale-100)/4;
tu_mc._yscale -= (tu_mc._yscale-100)/4;
if (tu_mc._xscale<=100) {
delete tu_mc.onEnterFrame;
}
};
};
//tu_mc为图片影片剪辑的实例名
tu_mc.onEnterFrame = function() {
tu_mc._xscale += (200-tu_mc._xscale)/4;
tu_mc._yscale += (200-tu_mc._yscale)/4;
if (tu_mc._yscale>=200) {
delete tu_mc.onEnterFrame;
}
};
};
tu_mc.onRollOut = function() {
tu_mc.onEnterFrame = function() {
tu_mc._xscale -= (tu_mc._xscale-100)/4;
tu_mc._yscale -= (tu_mc._yscale-100)/4;
if (tu_mc._xscale<=100) {
delete tu_mc.onEnterFrame;
}
};
};
//tu_mc为图片影片剪辑的实例名
全部回答
- 1楼网友:上分大魔王
- 2021-04-12 21:52
deng.onrollover = function () {
this.onenterframe = function() {
this._height += 5;
this._width += 5;
};
};
deng.onrollout = function () {
delete this.onenterframe;
};当鼠标移入图片,,,图片放大,deng为图片影片实例名,移出时,图片停止放大
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯