The application is created using Angular. Within a component, we have a div containing some text:
<div>abcdefghijklmnop<div>
Depending on the screen size, the text should either be fully displayed or clipped. I discovered the property 'text-overflow
', which clips the text as abcde...
. However, the specific requirement is to clip the text differently,
<first 3 characters>...<last 3 characters>
This means it should appear like abc...nop
. How can we achieve this? The browser being used is Chrome.