Home » , » Tutorial Arctext.js – Curving Text with CSS3 and jQuery

Tutorial Arctext.js – Curving Text with CSS3 and jQuery

Demo     -     Download     -     Source


Tutorial Arctext.js – Curving Text with CSS3 and jQuery, While CSS3 allows us to rotate letters, it is quite complicated to arrange each letter along a curved path. Arctext.js is a jQuery plugin that let’s you do exactly that. Based on Lettering.js, it calculates the right rotation of each letter and distributes the letters equally across the imaginary arc of the given radius.

How it works

The main idea behind the Arctext plugin is to rotate letters with CSS3 transforms in order to place them along a curved path. The curve is always a segment of a circle (hence arc) for which the radius can be specified. The space and rotation for each letter will be calculated using that radius and the width of the text.



Options

The following options are available:

radius : 0,
// the minimum value allowed is
// half of the word length.
// if set to -1, the word will be straight.

dir : 1,
// 1: curve is down,
// -1: curve is up

rotate : true,
// if true each letter should be rotated.

fitText : false
// if you want to try out the
// fitText plugin (http://fittextjs.com/)
// set this to true.
// Don't forget, the wrapper should be fluid.
Share this article :

1 comments:

  1. That's nice awesome JS trick!
    Love it! Thanks for share this !

    ReplyDelete

 
Support : Femin Collection | Habitat Design | Kreatifa Media
Copyright © 2013. Kreatifa Media - All Rights Reserved
Template Created by Habitat Design Published by Kreatifa Media
Proudly powered by Blogger