有人知道如何使 JustGage 对象响应吗? 请检查下面的链接,我用 raphael 解决了这个问题,但无法用 JustGage 做同样的事情:
window.onload = function () {
var g1 = new JustGage({
id: "g1",
value: getRandomInt(0, 4000),
min: 0,
max: 4000,
title: "Well over thousand",
label: ""
});
}
最佳答案
只需将 relativeGaugeSize: true
添加到您的代码
无需固定高度
#g1 {
/* width: 400px; */
/* height:300px; */
}
脚本
var g1 = new JustGage({
id: "g1",
value: getRandomInt(0, 4000),
min: 0,
max: 4000,
title: "Well over thousand",
label: "",
relativeGaugeSize: true
});
关于javascript - 响应式 JustGage JAUGE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17240465/