qq空间点击弹出图片放大效果代码

 时间:2013-01-08 01:40:19 贡献者:红豆半戒

导读: qq 空间点击弹出图片放大效果代码 *{ margin:0; padding:0;} body { background:#333; } .main{ width:890px; height:auto; overflow:hidden; background:#303030;} .box{ width:559px; height:auto; background:url(http://www.miaov.com/miaov_dem

qq空间装扮怎么使用免费代码?(最好有图片)
qq空间装扮怎么使用免费代码?(最好有图片)

qq 空间点击弹出图片放大效果代码

" title="

var ev = ev || event; ev.cancelBubble = true; }; aPhoto[i].style.width = first(aPhoto[i]).width + 12 +'px'; aPhoto2[i].style.width = last(aPhoto2[i]).width + 12 +'px'; } function toBig(){ this.style.display = 'none'; addClass(aPhoto2[this.index],'photo3'); } function toSmall(){ removeClass(this,'photo3'); aPhoto[this.index].style.display = 'block'; } }; function drawImage(ImgD){ var image = new Image(); image.src = ImgD.src; var width = ImgD.width; var height = ImgD.height; if(image.width > 0 && image.height > 0){ if(image.width / image.height >= width / height){ if(image.width > width){ ImgD.width = width; ImgD.height = (image.height * width) / image.width; } else{ ImgD.width = image.width; ImgD.height = image.height; } } else{ if(image.height > height){ ImgD.height = height; ImgD.width = (image.width * height) / image.height; } else{ ImgD.width = image.width; ImgD.height = image.height; } } } } function getElementsByClassName(oElem, strTagName, strClassName){

var arrElements = (strTagName == '*' && oElem.all) ? oElem.all : oElem.getElementsByTagName(strTagName); var returnArrElements = new Array(); var oRegExp = new RegExp('(^|s)' + strClassName + '($|s)'); for(var i=0; i

return elem; } function first(elem){ elem = elem.firstChild; return elem && elem.nodeType != 1 ? next(elem) : elem; } function last(elem){ elem = elem.lastChild; return elem && elem.nodeType != 1 ? prev(elem) : elem; }

" target="_blank">

var ev = ev || event; ev.cancelBubble = true; }; aPhoto[i].style.width = first(aPhoto[i]).width + 12 +'px'; aPhoto2[i].style.width = last(aPhoto2[i]).width + 12 +'px'; } function toBig(){ this.style.display = 'none'; addClass(aPhoto2[this.index],'photo3'); } function toSmall(){ removeClass(this,'photo3'); aPhoto[this.index].style.display = 'block'; } }; function drawImage(ImgD){ var image = new Image(); image.src = ImgD.src; var width = ImgD.width; var height = ImgD.height; if(image.width > 0 && image.height > 0){ if(image.width / image.height >= width / height){ if(image.width > width){ ImgD.width = width; ImgD.height = (image.height * width) / image.width; } else{ ImgD.width = image.width; ImgD.height = image.height; } } else{ if(image.height > height){ ImgD.height = height; ImgD.width = (image.width * height) / image.height; } else{ ImgD.width = image.width; ImgD.height = image.height; } } } } function getElementsByClassName(oElem, strTagName, strClassName){

var arrElements = (strTagName == '*' && oElem.all) ? oElem.all : oElem.getElementsByTagName(strTagName); var returnArrElements = new Array(); var oRegExp = new RegExp('(^|s)' + strClassName + '($|s)'); for(var i=0; i

return elem; } function first(elem){ elem = elem.firstChild; return elem && elem.nodeType != 1 ? next(elem) : elem; } function last(elem){ elem = elem.lastChild; return elem && elem.nodeType != 1 ? prev(elem) : elem; }

更多详细内容请查看北京室内设计培训班:http://www.xinghuanyicai.com 北京网页设计培训 编辑来自:pb 管材 www.lsguancai.com

 
 

微信扫一扫 关注一点知道
微信提问题 答案马上自动回复