Jump to content


Is it possible that make a tween on font weight?

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Is it possible that make a tween on font-weight while a div was hovered?


here's my codepen:

See the Pen rgieo by WW (@WW) on CodePen


but, it's not smooth enough.

it just change so suddenly.

Does anyone has any idea on it?


Thanks for ur help ^^ & sorry for a stupid question.  :shock:


Link to comment
Share on other sites

Nope, not possible. Changing font-weight swaps to a new font file - there are no intermediate steps to tween between. I suppose if you were using a font with multiple bold levels (e.g. 400, 600, 700, 900) you could tween the numeric weights and get 2 or 3 tweening steps there, but that's it.

See the Pen mHrzE by jamiejefferson (@jamiejefferson) on CodePen

This is the closest solution there is, but it's webkit only, and frankly looks pretty rubbish.

  • Like 3
Link to comment
Share on other sites

The only think I can think of is using SVG text and tweening the stroke width to fake it.

  • Like 2
Link to comment
Share on other sites

Thank u JamieJafferson & Dave.

I'll try both ways to solve my problems.

Thanks for ur answers.  :-D

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.