gpt4 book ai didi

javascript - Justgage.js 更改标题、值、标签字体大小

转载 作者:行者123 更新时间:2023-11-30 07:34:46 26 4
gpt4 key购买 nike

enter image description here

我正在尝试使用 [titleFontSize: 12..] 和各种组合来减小字体大小。但没有工作。与我用于 [valueFontSize: ..] & [labelFontSize: ..]

如何更改标题、值和标签的字体大小?

代码:

<script src="js/raphael-2.1.4.min.js"></script>
<script src="js/justgage.js">

<script type="text/javascript">
var gD = new JustGage({
id: "jgDownload",
value: 67,
decimals: 2,
min: 0,
max: 1000,
title: "Download",
titleFontSize: 12,
titlePosition: "below",
titleFontColor: "red",
titleFontFamily: "Georgia",
titlePosition: "below",
valueFontColor: "blue",
valueFontFamily: "Georgia"
label: "Mbps",
lableFontSize: "10px",
width: 300,
height: 200,
relativeGaugeSize: true,
levelColors: [
"#E63454",
"#AC001F",
"#F6AD37",
"#B87200",
"#24A081",
"#007759",
"#026071",
"#015C71"
],
pointer: true,
counter: true,
});
</script>

var gD = new JustGage({
id: "jgDownload",
value: 67,
decimals: 2,
min: 0,
max: 1000,
title: "Download",
titleFontSize: "5px",
titlePosition: "below",
valueFontFamily: "Georgia",
valueFontSize: "5px",
label: "Mbps",
width: 300,
height: 200,
relativeGaugeSize: true,
levelColors: [
"#E63454",
"#AC001F",
"#F6AD37",
"#B87200",
"#24A081",
"#007759",
"#026071",
"#015C71"
],
pointer: true,
counter: true,
});
#divDownloadOuter {
width: 50%;
clear: both;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.4/raphael-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/justgage/1.2.2/justgage.js"></script>
<div id="divDownloadOuter">
<div id="jgDownload"></div>
</div>

JSFiddle:Link

最佳答案

尝试使用 titleMinFontSize。它会起作用。

titleMinFontSize: 20,

检查这个link对于其他属性。

关于javascript - Justgage.js 更改标题、值、标签字体大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37673917/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com