Style The Last Line Of A Paragraph – lastLine.js

Category: Javascript , Text | November 28, 2018
Author:Kovich73
Views Total:888 views
Official Page:Go to website
Last Update:November 28, 2018
License:MIT

Preview:

Style The Last Line Of A Paragraph – lastLine.js

Description:

lastLine.js is a JavaScript library to find the last line of a paragraph so that you can apply your own CSS styles.

Fully responsive and works on any devices.

How to use it:

Import the JavaScript file lastLine.js into the document.

<script src="js/lib/lastLine.js"></script>

Add the CSS class last-line to the paragraph.

<h2 class="last-line">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas eget augue posuere, ullamcorper turpis vel, tristique leo. Ut tortor nisi, laoreet et neque mollis, condimentum ultrices leo. Ut eu orci ut magna euismod laoreet a quis neque. Phasellus pretium fringilla varius. Morbi a malesuada tortor. Pellentesque risus ipsum, semper sed finibus ut, tristique ut leo. Curabitur porttitor id arcu a rhoncus. Morbi a pulvinar ligula. Donec ac posuere eros.
</h2>

Style the last line whatever you like.

.last-line-row {
  border-bottom: 3px solid white;
}

You Might Be Interested In:


Leave a Reply