有没有什么方法可以增加两次大胆涂抹的强度?
我在我的文本上使用这种样式:
numbers: {
fontSize: 30,
color: '#31C283',
fontWeight: 'bold',
},
有没有可能在不增加字体大小的情况下使其加倍/更加加粗?
您可以通过在属性fontweight
处设置数值来稍微调整粗细。
除了bold
之外,属性fontweight
还可以处理数值,例如100
表示非常细,900
表示非常粗。
据我所知,fontweight:'bold'
具有数值fontweight:'700'
。
所以:
fontweight:'900'
应略粗于fontweight:'bold'
好吧,这并不是你实际要求的“双倍”,但也许这对你有一点帮助。
来源:https://www.w3schools.com/cssref/pr_font_weight.asp
如果你想要一个比fontweight:'900'
更“大胆”的文本,你必须使用“视觉欺骗”,例如。 例如,另一种字体系列或文本阴影。
以下是一些示例:
null
<div style="font-weight:900;">I am the highest font-weight value 900</div>
<div class="doublethick">But I am even thicker :)</div>
<style>
.doublethick {
color:#000000;
text-shadow: 0.5px 0 #000000;
letter-spacing:1px;
font-weight:bold;
}
</style>
您可以使用文本阴影属性,如下所示
null
<h1 style="text-shadow: 2px 0px 1px #000;">This is h1 tag</h1>
要使数字变成双粗体,可以使用以下代码
numbers: {
font-size: 30;
color: hex;
font-weight: 800;
}
我想会管用的。