micku7zu/vanilla-tilt.js

Glare On Text

negustaf opened this issue · 1 comments

I'm in vanilla, trying to apply glare to just the text in an H1 element. The glare is applied to the entire H1 line height and not just the displayed text itself. How would I fix this?
<h1 class="bt-an" data-tilt data-tilt-full-page-listening data-tilt-reverse="true" data-tilt-glare data-tilt-max-glare="0.8">An</h1>
Screen Shot 2022-09-24 at 18 32 16

Hello negustaf, you can change the line height of your line through CSS property line-height and make it so that it only contains your text. As for h1, the line-height of 0.8em would do the trick, so try and find the optimized line-height for your text and you will be fine. hope it solves your issue...