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

Receive udp packets in android gstreamer -

php - Extract Text from HTTP referer -

matplotlib - PYTHON: Annotate boxes disapear dependant on range -