css - Show first 3 lines in html paragraph -


i want show first 3 lines of paragraph below using html formatting. searching on w3shool doesn't show how it. please help

<body>  loremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremlor loremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremlore loremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremlore loremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremlore loremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremloremlore  </body> 

you can give container height , line-height , set overflow property hidden:

html

<p>loremloremlorem...</p> 

css

p {     height:60px;     line-height:20px; /* height / no. of lines display */     overflow:hidden; } 

jsfiddle example.


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -