gpt4 book ai didi

html - 如何将字体添加到类

转载 作者:太空宇宙 更新时间:2023-11-04 01:07:14 28 4
gpt4 key购买 nike

嘿,谁能告诉我如何向 HTML 类添加字体?我正在看一个教程,但跳过了那部分,我很困惑他到底做了什么。有一个包含不同元素的框类,他试图在跳过之前添加字体样式。

这是 HTML 和 CSS,不包括 <head><body>标签:

.body {
Background-color: red;
}

.box {
Width: 174px;
Height: 250px;
Background: yellow;
Width: 25px Padding:20px;
}

.true {
Background-color: brown;
}

.true2 {
Background-color: green
}
<Div class="box true"> this is an example</Div>
<Div class="box true2> parenthesis</Div>

最佳答案

使用 font-family类中的样式:

例子:

body {
font-family: Arial, sans-serif;
}

关于html - 如何将字体添加到类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51900620/

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