reinhat Posted May 15, 2013 Share Posted May 15, 2013 Hi, Is it possible to animate an existing text weight from regular/normal font weight to bold style? Either in the Actionscript or Javascript version? I have a sentence where I need to "bolden" a keyword and it would be nice to animate it with an effect rather than just switch. Thanks, Attila Link to comment Share on other sites More sharing options...
Carl Posted May 15, 2013 Share Posted May 15, 2013 There isn't a good and smooth way that I'm aware of in ActionScript or JavaScript. In JavaScript you could attempt to tween the fontWeight of an element but that doesn't really work well. See this demo here: http://www.w3schools.com/cssref/playit.asp?filename=playcss_font-weight&preval=bolder You'll see that valid font-weights range from100 to 900 in increments of 100. Selecting the various values with the radio buttons rarely has any affect as its unlikely that a font is going to be available in all those weights. At best you may get a jittery change in fontWeight, but again I don't think its what you are after. Link to comment Share on other sites More sharing options...
Chrysto Posted May 16, 2013 Share Posted May 16, 2013 Hi; I think that animation of letter-spacing and text-shadow may come in handy; http://jsfiddle.net/bassta/69TNn/2/ Also, you can animate -webkit-text-stroke http://jsfiddle.net/bassta/dREHV/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now