Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to curve / arc / bend only the bottom or top of text using CSS3

I'm looking to see if it's possible to make the following effect with purely css / jquery. I already know how to bend text in a circle, but that bends the entire element and I can't figure out how to just bend the bottom portion of the text to a circle. I guess I'm looking more to distort the text but I don't know how to best ask the question..

The purpose is to allow for elements such as these to be used as animated live text across banners.

I'd appreciate any help you guys can be. Fiddle's would be greatly appreciated.

Curved Text css3

like image 792
Rob Avatar asked Mar 14 '23 13:03

Rob


2 Answers

Nope! CSS can't actually warp text like that.

You could conceivably use different sizes for each letter and then have them aligned at the top, but that's not quite the same thing, and it wouldn't be dynamic.

Edit

markE proposed a canvas-based solution that is potentially useful to you. It's not really a CSS solution as you asked for, but perhaps the JS manipulation will get what you want: http://jsfiddle.net/AbdiasSoftware/e8hZy/

like image 149
Tyler Avatar answered Mar 16 '23 02:03

Tyler


If you don't care about browser support, i.e. if this only need to work in modern browser, then you may be able to do this by using SVG.

First, you'll need to create the curved text in SVG. Then you SMIL animate the individual SVG element or CSS animate the individual SVG element.

like image 30
Lie Ryan Avatar answered Mar 16 '23 03:03

Lie Ryan