Skip to main content

10 of the Best CSS3 Code Generators

By Craig Buckler

Blogs

Share:

Free JavaScript Book!

Write powerful, clean and maintainable JavaScript.

RRP $11.95

This article was written in 2011 and remains one of our most popular posts. If you’re keen to learn more about CSS3, you may find this recent article on transform techniques of great interest.

I have rose-tinted memories of CSS2.1. Rounded corners may have caused hours of Photoshopping grief, but it was simple. Most developers could recall the few dozen properties without referring to reference books every two minutes.

CSS3 changes everything. There are 116 new properties* with multiple vendor prefixes and different syntaxes. No one could be expect you to memorize everything. Fortunately, there are a number on free online tools which will help you create modern CSS3 code to cut and paste into your stylesheets…

CSS 3.0 MakerCSS 3.0 Maker screenshot

CSS 3.0 Maker is a fabulous tool. You can define box radii, gradients, text shadows, box shadows, transforms, transitions and rotations by adjusting a few sliders. A preview area shows the result and indicates which desktop and mobile browsers support the properties.

CSS code can be copied from the Codeview box and downloaded within an HTML file which demonstrates the effect.

LayerStyles.orgLayerStyles screenshot

Photoshop users will love LayerStyles. CSS3 effects are defined using a layer style dialog which will be immediately familiar to anyone using Adobe products. It’s easy, logical, and a joy to use.

Code can be copied from the dynamically-updated “CSS Code” viewer in the bottom-left of the screen.

CSS3 GeneratorCSS3 Generator screenshot

CSS3 Generator uses a wizard-like approach to define styles. Choose from a variety of effects including border radius, text shadow, box shadow, multiple columns, transforms and transitions. Then, complete a few boxes to apply them to the preview element.

CSS3 Generator highlights which browsers and versions support the effect and, where possible, provides IE-specific filter code.

CSS3 PlaygroundCSS3 Playground screenshot

CSS3 Playground has been created by freelance developer Mike Plate. As well as supporting a range of CSS3 properties, it’s the only tool which allows you to preview effects on more than one element and change the content of the boxes. Amazing.

CSS3 Button GeneratorCSS3 Button Generator screenshot

CSS3 effects can produce great-looking buttons without images. The CSS3 Button Generator allows you to tweak the font, padding, border, background gradient, inner shadow, drop shadow and text shadows using up/down controls which can be easier and more logical than sliders.

As well as providing cross-browser CSS3 code, the tool allows you to store and share styles with others. You can browse showcased buttons and adjust the properties for your own use.

CSS Tricks Button MakerCSS Tricks Button Maker screenshot

Button Maker was developed by Chris Coyier of CSS Tricks. Although it was intended as a technology demonstration, that hasn’t prevented it being useful to CSS3 developers!

Button Maker doesn’t support some of the more extreme CSS3 properties but it’s one of the only tools to show hover effects.

Ultimate CSS Gradient GeneratorUltimate CSS Gradient Generator screenshot

If pushed, even I can recall the text-shadow property. CSS3 gradients? No chance. Gradients may be powerful but they’re convoluted and, until recently, webkit browsers used a different syntax. Unless you’re creating a very simple background, a gradient generator is essential.

The Ultimate CSS Gradient Generator is, well, the ultimate gradient generator. It uses a similar interface to Photoshop and creates cross-browser code which includes IE filters. Finally, gradients can be saved and shared with a unique link. You’ll definitely want to bookmark this tool.

Have I missed your favorite CSS3 code generator?

* That number of new properties is entirely made up. I’ve no idea whether it’s correct but it sounded reasonable. I doubt anyone will refute it … unless there are any CSS pedants with a few hours to spare?

Craig is a freelance UK web consultant who built his first page for IE2.0 in 1995. Since that time he's been advocating standards, accessibility, and best-practice HTML5 techniques. He's created enterprise specifications, websites and online applications for companies and organisations including the UK Parliament, the European Parliament, the Department of Energy & Climate Change, Microsoft, and more. He's written more than 1,000 articles for SitePoint and you can find him @craigbuckler.

New books out now!

Learn how Git works, and how to use it to streamline your workflow!


Google, Netflix and ILM are Python users. Maybe you should too?