Hi, can anyone help me to check the answer? Thank you
Here is the link answer
Hi @Fgui_Zhang
Thanks for putting your code into CodePen
You did a great job with this task. Congratulations!
Some improvements:
- Because you used local URLs for your fonts they can’t be displayed. A possible alternative: Use a service like https://fonts.google.com. When you select a font on their site they show you how to integrate it (
@import
in CSS or<link>
tag in HTML). - Always use at least one fallback font like
font-family: aliceregular, serif;
If the main font fails to load you have at list a font in the same style. - Your selector
section > p
targets all<p>
in the<section>
. You could usesection h2 + p
to only select the paragraph that immediately follows the title in the section (Adjacent sibling combinator | MDN) -
vertical-align: middle;
doesn’t have an effect in this context and could be removed. It is mostly used for table cells. Your text in the nav list is automatically vertically centered, because the padding matches.
I hope my remarks will help you with your future coding. If you have any questions or tasks to assess, feel free to come back. We will happily help you
Have a nice day!
Michael
Thank you michael for your patient check.I’m a beginner of css, your advice seem reasonable,I think I got a lof of help.
Have a nice day!
Fgui
1 Like
We all start as beginners. That is how it works. The key to success is always trying to learn new things and improve oneself
Michael
1 Like