哪个属性用于更改元素的字体? [英] Which property is used to change the font of an element?

查看:216
本文介绍了哪个属性用于更改元素的字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在w3schools.com上参加了 CSS测验,而我除了下面的答案之外,所有的答案都是正确的。我试图搜索这个主题,但据我所知,答案应该是正确的。我错在哪里?真的很困惑这个。


15。哪一个属性用来改变元素的字体?



您回答:
$

$ b $ p





$ div
$ div $ >解决方案 font 属性是改变字体的各个方面的属性,包括系列,样式和重量。 font-family 属性只会改变font-family。这个家族是一组相关的字体(或

I took a CSS quiz at w3schools.com, and I got all of the answers correct except the one below. I tried to search on the subject, but as far as I can see the answer should be correct. Where am I wrong? Really confused with this.

15. Which property is used to change the font of an element?

You answered:

font-family

Wrong Answer!

解决方案

The font property is the one that changes all aspects of a font, including family, style and weight. The font-family property only changes the font-family. The family is a group of related fonts (or typefaces).

So 'Comic Sans MS' is a font family, while 'Comic Sans MS Bold 10pt' is a font. In speech, people tend to mix up those terms.

这篇关于哪个属性用于更改元素的字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆