顺晟科技
2021-06-16 11:00:32
566
函数整体(url) {
var Image=new Image();
image.src=url
var screenH=$(窗口)。高度(),
screenW=$(窗口)。width(),
屏幕百分比=数学。地板((屏幕宽度/屏幕高度)* 100)/100,
w,h,左,上;
image.onload=function () {
var imgH=image.height,
imgW=image.width,
IMGPercent=数学。楼层((IMGW/IMGH)* 100)/100,
imgWs=screenW,
//IMGhs=IMGh/IMGpercent;
//IMGhs=IMGh/IMGpercent;
IMGHs=数学。楼层((IMGWs/IMGPercent)* 100)/100;
if (imgW screenW) {
w=imgW
h=imgHs
top=(screenH-h)/2;
} else {
w=imgWs
h=imgHs
top=数学。楼层(((screenH-h)/2)* 100)/100;
}
排名前0?top=0 : top=top
$('#bigimg ').css({
top: top
}).attr('src ',URL);
$('.整体')。show();
}
}
//调用:WhILIMG(URL);
11
2022-05
19
2021-06
16
2021-06
16
2021-06
16
2021-06
16
2021-06