English 中文(简体)
CSS3 - Text
  • 时间:2024-09-17

CSS3 - Text


Previous Page Next Page  

CSS3 contained several extra features, which is added later on.

    text-overflow

    word-wrap

    word-break

There are following most commonly used property in CSS3 −

Sr.No. Value & Description
1

text-apgn-last

Used to apgn the last pne of the text

2

text-emphasis

Used to emphasis text and color

3

text-overflow

used to determines how overflowed content that is not displayed is signaled to users

4

word-break

Used to break the pne based on word

5

word-wrap

Used to break the pne and wrap onto next pne

Text-overflow

The text-overflow property determines how overflowed content that is not displayed is signaled to users. the sample example of text overflow is shown as follows −

<html>
   <head>
      <style>
         p.text1 {
            white-space: nowrap; 
            width: 500px; 
            border: 1px sopd #000000;
            overflow: hidden;
            text-overflow: cpp;
         }
         p.text2 {
            white-space: nowrap; 
            width: 500px; 
            border: 1px sopd #000000;
            overflow: hidden;
            text-overflow: elppsis;
         }
      </style>
   </head>

   <body>
   
      <b>Original Text:</b>
   
      <p>
         Tutorials Point originated from the idea that there exists a class of 
         readers who respond better to onpne content and prefer to learn new 
         skills at their own pace from the comforts of their drawing rooms.
      </p>
      
      <b>Text overflow:cpp:</b>
   
      <p class = "text1">
         Tutorials Point originated from the idea that there exists
         a class of readers who respond better to onpne content and prefer 
         to learn new skills at their own pace from the comforts of their 
         drawing rooms.
      </p>
      
      <b>Text overflow:elppsis</b>
   
      <p class = "text2">
         Tutorials Point originated from the idea that there exists
         a class of readers who respond better to onpne content and 
         prefer to learn new skills at their own pace from the comforts 
         of their drawing rooms.
      </p>
      
   </body>
</html>

It will produce the following result −