I have a DIV with a multi-line paragraph.
Is there any way (maybe using jQuery) to only show the first line of the paragraph and hide the others?
Definition of first-line : being the preferred, standard, or first choice first-line treatment of tuberculosis — compare second-line.
The ::first-line selector is used to add a style to the first line of the specified selector. Note: The following properties can be used with ::first-line: font properties. color properties.
With a first line indent, the first line of a paragraph is indented more than the other lines in the paragraph. Use the tab key to create a first line indent in Word for the web.
Here is a way (sort of) by making the paragraph white-on-white except the :first-line of it: http://jsbin.com/usora4/2/edit
Snippet of CSS:
p { color: white; }
p:first-line { color: black; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With