【代码笔记】Web-CSS-CSS Fonts(字体)

一,效果图。css

 

二,代码。html

 

复制代码
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>CSS Fonts(字体)</title> <style> body { font-size: 100%; } h1 { font-style: normal; font-size: 40px; font-size: 2.5em; } p.serif { font-family: "Times New Roman", Times, serif; font-style: italic; font-size: 30px; font-size: 1.875em; } p.sansserif { font-family: Arial, Helvetica, sans-serif; font-style: oblique; font-size: 14px; font-size: 0.875em; } </style> </head> <body> <h1>css font-family</h1> <p class="serif">this is a paragrapth,shown in the times new Roman font.</p> <p class="sansserif">this is a paragraph,shown in the arial font.</p> </body> </html>
复制代码

 

参考资料:《菜鸟教程》字体

相关文章
相关标签/搜索