09
2008
09
恢复SP1的图片随鼠标滚轮缩放功能
减小字体 增大字体 作者:未知 来源:未知 发布时间:2005-12-3 15:08:26用记事本打开inc/Dv_ubbcode.asp,找到
Private Function bbimg(strText,ssize)
Dim s
s=strText
re.Pattern="
]*)>"
If ssize=500 Then
s=re.replace(s,"
"& ssize &")this.style.width="&ssize&";"">")
Else
s=re.replace(s,"
"& ssize &")this.style.width="&ssize&";if(this.height>250)this.style.width=(this.width*250)/this.height;"">")
End If
bbimg=s
End Function
修改为
Private Function bbimg(strText,ssize)
Dim s
s=strText
re.Pattern="
]*)>"
If ssize=500 Then
s=re.replace(s,"
"& ssize &")this.style.width="&ssize&";"">")
Else
s=re.replace(s,"
"& ssize &")this.style.width="&ssize&";if(this.height>250)this.style.width=(this.width*250)/this.height;"">")
End If
bbimg=s
End Function
用记事本打开Main.js,找到
function bbimg(o){
var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';
return false;
}
修改为
function bbimg(o) {
if(event.ctrlKey) {
var zoom = parseInt(o.style.zoom, 10) || 100;
zoom -= event.wheelDelta / 12;
if(zoom > 0) {
o.style.zoom = zoom + '%';
}
return false;
} else {
return true;
}
}
注意:此方法与动网原来的缩放略有不同,要求鼠标移动到图片上按住Ctrl键滚动鼠标滚轮图片才缩放,不按住Ctrl则为整个页面滚动,图片不缩放!
发布:rwanboy | 分类:RWANBOY'S | 评论:0 | 浏览: