skip to content
Advertise here

CSS Fibonacci spirals

Example #1 - Using four images

north-west quadrantnorth-east quadrant south-west quadrantsouth-east quadrant north-east quadrantnorth-west quadrant south-west quadrant south-east quadrant

Example #2 - Pure CSS (no images)

Example #3 - and finally for mozilla etc (not IE)

using -moz-border-radius

CSS play Support


CSS play Recommend

Free, practical CSS menus, layouts, and examples

Follow CSS play

Facebook  Twitter  Facebook Fan Page



Just CSS | Designs for the future

Like the CSS Zen Garden?
Then why not visit Just CSS and see it you can design for the future.




Information

Prompted by a recent comment I give you my CSS version of Fibonacci's spiral (and no, I hadn't heard of it either). But here it is, produced by using just four quadrants of a circle images and sizes in ems so that it will scale up and down with text sizes.

1st July 2005

My pure CSS version using no graphics (but a bit chunky) added. This used em size containers and percentage size 'curves'.

31st August 2009

Moz border radius version updated to add a decreasing border width as suggested by Christopher Robert Jaquez.








Cascading Style Sheet

#spiral {position:relative; height:34em;}
#spiral21 {width:21em; position:absolute; left:0; top:13em;}
#spiral13 {width:13em; position:absolute; left:8em; top:0;}
#spiral8 {width:8em; position:absolute; left:0; top:0;}
#spiral5 {width:5em; position:absolute; top:8em; left:0;}
#spiral3 {width:3em; position:absolute; top:10em; left:5em;}
#spiral2 {width:2em; position:absolute; top:8em; left:6em;}
#spiral1a {width:1em; position:absolute; top:8em; left:5em;}
#spiral1b {width:1em; position:absolute; top:9em; left:5em;}

xhtml

<div id="spiral">
  <img id="spiral8" src="nw.gif" />
  <img id="spiral13" src="ne.gif" />
  <img id="spiral5" src="sw.gif" />
  <img id="spiral3" src="se.gif" />
  <img id="spiral2" src="ne.gif" />
  <img id="spiral1a" src="nw.gif" />
  <img id="spiral1b" src="sw.gif" />
  <img id="spiral21" src="se.gif" />
</div>

Copyright

Please ask permission before using or copying this example to your own web site.

If you are having problems integrating any of my demonstrations into your website then I now offer a service to fault find and correct any errors that you may have introduced. Please email me for more information.




  • Each week the Creare Group produce video tutorials for SEO and tips and tricks for the web design industry.
  • We offer nothing but the highest quality SEO, Social Media Optimisation And PPC services to businesses in London

 

CSS play Testimonial

"The citroen.co.uk web site uses
CSS play code for the site drop down menus.
This code works seamlessly in IE 6 & 7, and is an excellent solution to the Creative requirements of the site."

Damon Clark - Brandwidth