I’m trying to create on hover animation where it goes multiple lines depending the length of the heading. I managed to do it for the top navigation on the homepage but I’m having problem in replicating it for case studies are some the titles go across multiple lines.
Also wondering if there’s a way to set the length of the underline div to automatic depending of the length of the words? Currently I had to adjust them manually.
Managed to build it differently. The underlines are going across multiple lines in the case studies - 2 column layout section but I have no control on making them looking like the main nav (Appearing from left to right).
I tried adding gradient transition but based on research there’s a bug on this.
Does anyone have suggestion to resolve this please? Thanks!
Thanks for the suggestion with the border. Do you know if I could adjust distant between the text and border; and create similar interaction as per top section?
Top section: I created the underline using a div block. I set height, background colour and interaction to it. I have full control on how the interaction will look like but it doesn’t work on text across multiple lines.
Bottom section: I built the underline using gradient. By doing this, I still have full control on where the underline sits on the text; it works on text across multiple lines. But I’m not sure if there’s a way to control the interaction. I want the underline to appears from left to right as per the top section.