Display last two lines of a large text in a div

تبليغ
سؤال

يرجى شرح بإيجاز لمإذا تشعر أنك ينبغي الإبلاغ عن هذا السؤال.

تبليغ
‎إلغاء

I have continuous text added to a div, I want to display only the last two lines of the text in the div which is of fixed width. I could split the large text into multiple lines and then show the last two lines in the div but I was checking if there is any out of the box css property on div that can automatically display only last two lines and hide the rest.

Example:

A printing press is a mechanical device for
applying pressure to an inked surface resting
upon a print medium (such as paper or cloth),
thereby transferring the ink.

display only:

upon a print medium (such as paper or cloth),
thereby transferring the ink.

0
X 4 أشهر 2022-07-10T12:01:27+03:00 0 إجابة 2 مشاهدات مبتدئ 0

‫أضف إجابة

تصفح
تصفح

مجهول يجيب