出于某种原因,我建立的响应式网站可以在Android设备上运行,当我调整窗口大小时,但不是在iPhone上。我确实包含了
var chart = this,
points = chart.series[0].points,
shape, r, ang, posX, posY,
cX = chart.series[0].center[0],
cY = chart.series[0].center[1] + chart.plotTop;
chart.customImgs = [];
$.each(points, function (i, p) {
shape = p.shapeArgs;
r = shape.r;
ang = (shape.end - shape.start) / 2 + shape.start;
posX = cX + (r * 0.8) * (Math.cos(ang));
if((-.3) < Math.cos(ang) && Math.cos(ang) <.2){
var cal=.06;
posX = cX + (r * 0.7) * (Math.cos(ang) + cal)
}
var angle =(shape.end - shape.start)*360/Math.PI;
posY = cY + (r * 0.7) * Math.sin(ang);
var r1 = 2*(shape.end - shape.start)/Math.PI;
r1= r1>1 ? 1 : r1;
r= r*r1;
if(angle>25)
chart.customImgs.push(chart.renderer.image(
images[i],
posX + (p.labelPos[6] === 'right' ? (1) :(-1)) * (r / 8),
posY - r / 4, r / 4, r / 2)
.attr({
zIndex: 4,
'pointer-events': 'none'
})
.add());
});
},
redraw: function () {
var chart = this,
points = chart.series[0].points,
shape, r, ang, posX, posY,
cX = chart.series[0].center[0],
cY = chart.series[0].center[1] + chart.plotTop;
$.each(points, function (i, p) {
shape = p.shapeArgs;
r = shape.r;
ang = (shape.end - shape.start) / 2 + shape.start;
posX = cX + (r * 0.7) * Math.cos(ang);
if((-.3) < Math.cos(ang) && Math.cos(ang) <.2){
var cal=.1;
posX = cX + (r * 0.7) * (Math.cos(ang) + cal)
}
posY = cY + (r * 0.7) * Math.sin(ang);
if (chart.customImgs[i]) {
chart.customImgs[i].attr({
x: posX + (p.labelPos[6] === 'right' ? (1) : (-1)) * (r / 8),
y: posY - r / 4,
});
}
});
}
}
},
在我的头部。这有什么可能的原因吗?谢谢!
<meta name="viewport" content="width=device-width; maximum-scale=1; minimum-scale=1;" />
答案 0 :(得分:0)
首先,替换:
<meta name="viewport" content="width=device-width; maximum-scale=1; minimum-scale=1;" />
<meta name="viewport" content="width=device width">
与
<meta name="viewport" content="width=device-width, initial-scale=1">
我们不能只用这段代码告诉你更多,先生。