gpt4 book ai didi

html - 在 freecodecamp.com 上导入谷歌字体

转载 作者:可可西里 更新时间:2023-11-01 14:45:26 24 4
gpt4 key购买 nike

我正在 freecodecamp.com 上学习第 15 课,但我似乎无法完成它。目标是让我的 h2 元素使用字体 'Lobster',同时保持 Monospace。我应该复制,“http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>”。这是我写的代码:

<style>
.red-text {
color: red;
}

p {
font-size: 16px;
font-family: Monospace;
}
</style>

<style>
<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>
</style>

<h2 class='red-text'>CatPhotoApp</h2>

<p class='red-text'>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class='red-text'>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

最佳答案

<head>
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}

p {
font-size: 16px;
font-family: Monospace;
}

h2 {
font-size: 16px;
font-family: Lobster;
}
</style>
</head>

<h2 class="red-text";>CatPhotoApp</h2>

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

上面的代码帮助我进入下一步。我最初在 CSS 样式中调用了龙虾字体,哎呀!最后我找到了这个网站和下面的链接(https://developers.google.com/fonts/docs/getting_started)来帮助我意识到我需要在样式之前创建一个头部并将调用放在那里(头部),当然是从说明中复制和粘贴的。

关于html - 在 freecodecamp.com 上导入谷歌字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31103577/

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