资讯专栏INFORMATION COLUMN

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

dance / 1373人阅读

一,效果图。

 

二,代码。

 

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-familyh1>
    <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>

 

参考资料:《菜鸟教程》

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/1303.html

相关文章

  • CSS 小结笔记之图标字体(IconFont)

    摘要:本篇主要介绍一种非常好用的图标大法图标字体。图标字体可以非常便捷的去解决以上问题,使用起来也非常简单。并且改变图标大小只需要改变字体大小就可以了。  本篇主要介绍一种非常好用的图标大法——图标字体(IconFont)。   什么是图标字体?顾名思义,它是一种字体,只不过这个字体显示的并不是具体的文字之类的,而是各种图标。   网站上经常会用到各种图标,之前网页上使用图...

    番茄西红柿 评论0 收藏0
  • 代码笔记Web-CSS-CSS 教程

    一,效果图。 二,代码。 DOCTYPE html> CSS 教程 body { background-color: #d0e4fe; } h1 { color: range; text-align: center; } p { fon...

    endless_road 评论0 收藏0
  • 代码笔记Web-CSS-CSS 语法

    一,效果图。 二,代码。 DOCTYPE html> CSS 语法 p { color: red; text-align: center; } Hello world! this paragraph is styled with css   参考资料:《菜鸟教程》

    zhangwang 评论0 收藏0
  • 代码笔记Web-CSS-CSS id和Class选择器

    一,效果图。 二,代码。 DOCTYPE html> CSS id和class选择器 #para1 { text-align: center; color: red; } .center { text-align: center; } p.center...

    Pluser 评论0 收藏0
  • 代码笔记Web-CSS-CSS background背景

    摘要:实例改文本插入在元素中该段落有自己的背景颜色背景图片不重复,设置实例背景图片只显示一次,并与文本分开实例中还添加了属性用于让图片与文本间隔开参考资料菜鸟教程一,效果图。 二,代码。 DOCTYPE html> CSS backgrounds h1 { background-color: #6495ed; } ...

    番茄西红柿 评论0 收藏0

发表评论

0条评论

最新活动
阅读需要支付1元查看
<