📜  入门 CSS 排版

📅  最后修改于: 2022-05-13 01:56:38.976000             🧑  作者: Mango

入门 CSS 排版

排版是 Primer 的一项功能,用于设置文本内容的样式和格式。它用于创建标题、副标题、段落、拉引号、添加更多面向设计的字体样式等等。它反应灵敏,但规模较小,并且标题设置在营销字体中。

Primer CSS Typography 具有三种类型的实用程序,所有这些都在下面提到并简要描述。

入门 CSS 排版类:

  • 标题实用程序:用于创建不同类型的标题,每种类型有七种标题,我们有单独的类,如h0-mktgh1-mktgh2-mktgh3-mktgh4-mktgh5-mktg ,和h6-mktg
  • 正文内容实用程序:这用于创建不同字体大小的正文元素,每种类型有七种标题,我们有单独的类,如f0-mktgf1-mktgf2-mktgf3-mktgf4-mktgf5 -mktgf6-mktg
  • 排版实用程序:这是在 Primer CSS 的核心实用程序之外使用的。

句法:

...

示例 1:在此示例中,我们将看到 Primer CSS Typography 的标题实用程序

HTML



    Primer CSS Typography
     


    
        

GeeksforGeeks

        Primer CSS Typography     
    
        

Primer CSS: h0-mktg class

           

Primer CSS: h1-mktg class

           

Primer CSS: h2-mktg class

           

Primer CSS: h3-mktg class

           

Primer CSS: h4-mktg class

           

Primer CSS: h5-mktg class

           

Primer CSS: h6-mktg class

       


HTML



    Primer CSS Typography
     


    
        

GeeksforGeeks

        Primer CSS Typography     
    
        f0-mktg:         

            We welcome you to the platform, where we consistently             strive to offer the best of education.         

           f1-mktg:         

            We welcome you to the platform, where we consistently             strive to offer the best of education.         

           f2-mktg:         

            We welcome you to the platform, where we consistently             strive to offer the best of education.         

           f3-mktg:         

            We welcome you to the platform, where we consistently             strive to offer the best of education.                     

           f4-mktg:         

            We welcome you to the platform, where we consistently             strive to offer the best of education.         

           f5-mktg:         

            We welcome you to the platform, where we consistently             strive to offer the best of education.         

           f6-mktg:         

            We welcome you to the platform, where we consistently             strive to offer the best of education.         

       


HTML



    Primer CSS Typography
     


    
        

GeeksforGeeks

        Primer CSS Typography     
    
        pullquote:         

            We welcome you to the platform, where we consistently             strive to offer the best of education.         

           Without pullquote:         

            We welcome you to the platform, where we consistently             strive to offer the best of education.         

    


输出:

示例 2:在本示例中,我们将看到 Primer CSS Typography 的正文内容实用程序

HTML




    Primer CSS Typography
     


    
        

GeeksforGeeks

        Primer CSS Typography     
    
        f0-mktg:         

            We welcome you to the platform, where we consistently             strive to offer the best of education.         

           f1-mktg:         

            We welcome you to the platform, where we consistently             strive to offer the best of education.         

           f2-mktg:         

            We welcome you to the platform, where we consistently             strive to offer the best of education.         

           f3-mktg:         

            We welcome you to the platform, where we consistently             strive to offer the best of education.                     

           f4-mktg:         

            We welcome you to the platform, where we consistently             strive to offer the best of education.         

           f5-mktg:         

            We welcome you to the platform, where we consistently             strive to offer the best of education.         

           f6-mktg:         

            We welcome you to the platform, where we consistently             strive to offer the best of education.         

       

输出:

示例 3:在此示例中,我们将看到 Primer CSS Typography 的排版实用程序

HTML




    Primer CSS Typography
     


    
        

GeeksforGeeks

        Primer CSS Typography     
    
        pullquote:         

            We welcome you to the platform, where we consistently             strive to offer the best of education.         

           Without pullquote:         

            We welcome you to the platform, where we consistently             strive to offer the best of education.         

    

输出:

参考: https://primer.style/css/utilities/marketing-type#typography