[英]Css font weight in percentage
I have a requirement like below, 我有如下要求,
Here as you can see the Body1
has a normal font which is easy to achieve, but the requirement for the Body subtext
font is such that it should have 55% boldness of Body1
as can be seen in the pic above. 在这里你可以看到
Body1
有一个很容易实现的普通字体,但是对于Body subtext
字体的要求是它应该具有Body1
55% Body1
如上图所示。 How can I achieve the same? 我怎样才能实现同样的目标?
PS: I tried font weight setting it between 100-400 but this doesn't seem to make a difference. PS:我尝试将字体重量设置在100-400之间,但这似乎没有什么区别。
I don't see in the picture the difference of boldness between Body 1 and Body subtext. 我没有在图片中看到Body 1和Body subtext之间的粗体差异。 If I understand well your question, font-weight doesn't accept direct percentage values, but since normal = 400, 55% boldness of normal is nearly 200 (actually is 220 but not accepted value).
如果我理解你的问题,font-weight不接受直接百分比值,但是因为normal = 400,正常的55%粗体接近200(实际上是220但不接受的值)。
However, if you tried 100 to 400 and it doesn't work, it's perhaps because that you didn't give it the right way. 但是,如果您尝试100到400并且它不起作用,那可能是因为您没有以正确的方式给它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.