📜  Tailwind CSS 文本对齐

📅  最后修改于: 2021-08-29 13:07:00             🧑  作者: Mango

这个类接受很多 Tailwind CSS 中的值,其中所有的属性都以类的形式覆盖。它是 CSS text-align 属性的替代品。此类用于指定元素中文本的水平对齐方式。

文本对齐类:

  • 左文本
  • 文本中心
  • 右文字
  • 文本对齐

text-left:用于设置文本向左对齐。

句法:

...

例子:

HTML
 
 
     
 
  
 
    

        GeeksforGeeks     

      Tailwind CSS Text Alignment Class      
        

            Geeksforgeeks: A Computer Science portal for Geeks              those who wants to persue an engiinering degree or             wants to create a creer on engineering field.         

       
    


HTML
 
 
     
 
  
 
    

        GeeksforGeeks     

      Tailwind CSS Text Alignment Class      
        

            Geeksforgeeks: A Computer Science portal for Geeks              those who wants to persue an engiinering degree or             wants to create a creer on engineering field.         

       
    


HTML
 
 
     
 
  
 
    

        GeeksforGeeks     

      Tailwind CSS Text Alignment Class      
        

            Geeksforgeeks: A Computer Science portal for Geeks              those who wants to persue an engiinering degree or             wants to create a creer on engineering field.         

       
    


HTML
 
 
     
 
  
 
    

        GeeksforGeeks     

      Tailwind CSS Text Alignment Class      
        

            Geeksforgeeks: A Computer Science portal for Geeks              those who wants to persue an engineering degree or             wants to create a career on engineering field.         

       
    


输出:

text-center:用于设置文本居中对齐。

句法:

...

例子:

HTML

 
 
     
 
  
 
    

        GeeksforGeeks     

      Tailwind CSS Text Alignment Class      
        

            Geeksforgeeks: A Computer Science portal for Geeks              those who wants to persue an engiinering degree or             wants to create a creer on engineering field.         

       
      

输出:

text-right:用于设置文本对齐方式为右对齐。

句法:

...

例子:

HTML

 
 
     
 
  
 
    

        GeeksforGeeks     

      Tailwind CSS Text Alignment Class      
        

            Geeksforgeeks: A Computer Science portal for Geeks              those who wants to persue an engiinering degree or             wants to create a creer on engineering field.         

       
      

输出:

text-justify:用于拉伸元素的内容以显示每行相同的宽度。

句法:

...

例子:

HTML

 
 
     
 
  
 
    

        GeeksforGeeks     

      Tailwind CSS Text Alignment Class      
        

            Geeksforgeeks: A Computer Science portal for Geeks              those who wants to persue an engineering degree or             wants to create a career on engineering field.         

       
      

输出:

文字对齐