In the web page you can show the paragraph of text and you want to show only three line text on the screen. If more that three line you cannot show the remaining lines in the webpage. More than three line text come after third line it should be ended with dotted like this …
How to do this.
You can create this with css. Simple line of css code you can do this. I create the paragraph of text and it should be more than three after three lines its should be finished with dots.
CSS Code:
p.msg{ display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; height: 40px; overflow: hidden; text-overflow: ellipsis; }In the above code you can see the webkit-line-clamp: 3; in the line you can change the number how much line you want to show in the webpage. If you want to show 5 lines means you can change the number to 5.
HTML Code:
<p class="msg">Skating between juniors Nicolas Roy and Julien Gauthier on the Carolina Hurricanes, Bishop played against the Washington Capitals Monday night at the Verizon Centre in D.C. He sat out Tuesday’s game against the Tampa Bay Lightning, but is expected to dress in a rematch tonight against the Lightning in Raleigh, N.C. This is Bishop’s third training camp with the Hurricanes after Carolina plucked him in the fifth round, 127th overall, in the 2014 NHL Entry Draft. But it’s different this time around, mainly because the 20-year-old from St. John’s is set to turn pro after four years in the Quebec Major Junior Hockey League.</p>
Output:
Skating between juniors Nicolas Roy and Julien Gauthier on the Carolina Hurricanes, Bishop played against the Washington Capitals Monday night at the Verizon Centre in D.C.
He sat out Tuesday’s game against the Tampa Bay Lightning, but is expected to dress in a rematch tonight against the Lightning in Raleigh, N.C.
This is Bishop’s third training camp with the Hurricanes after Carolina plucked him in the fifth round, 127th overall, in the 2014 NHL Entry Draft. But it’s different this time around, mainly because the 20-year-old from St. John’s is set to turn pro after four years in the Quebec Major Junior Hockey League.