Connecting The Dots With CSS3
As a web community, we’ve made a lot of exciting progress in regards to CSS3. We’ve put properties like text-shadow & border-radius to good use while stepping into background-clip and visual effects like transitions and animations. We’ve also spent a great deal of time debating how and when to implement these properties. Just because a property isn’t widely supported by browsers or fully documented at the moment, it doesn’t mean that we shouldn’t be working with it. In fact, I’d argue the opposite.
Best practices for CSS3 usage need to be hashed out in blog posts, during spare time, and outside of client projects. Coming up with creative and sensible ways to get the most out of CSS3 will require the kind of experimentation wherein developers gladly trade ten failures for a single success. Right now, there are tons of property combinations and uses out there waiting to be discovered. All we have to do is connect the dots. It’s time to get your hands dirty and innovate!

Where Do I Start?
One of my favorite things to do is to scan a list of CSS properties and consider which ones might work well together. What would be possible if I was to connect @font-face to text-shadow and the bg-clip:text property? How could I string a webkit-transition and opacity together in a creative way? Here are a few results from experiments I’ve done recently. While some may be more practical than others, the goal here is to spark creativity and encourage you to connect a few dots of your own.
Note: While Opera and Firefox may soon implement specs for many of the CSS3 properties found here, some of these experiments will currently only work in Webkit-browsers like Google Chrome or Safari.
Example #1: CSS3 Transitions
A safe place to start with CSS3 visual effects is transitioning a basic CSS property like color, background-color, or border on hover. To kick things off, let’s take a link color CSS property and connect it to a .4 second transition.
Start with your link CSS, including the hover state:
a { color: #e83119; }
a:hover { color:#0a99ae; }
Now, bring in the CSS3 to set and define which property you’re transitioning, duration of transition and how that transition will proceed over time. In this case we’re setting the color property to fade over .4 seconds with an ease-out timing effect, where the pace of the transition starts off quickly and slows as time runs out. To learn more about timing, check out the Surfin’ Safari Blog post on CSS animations. I prefer ease-out most of the time simply because it yields a more immediate transition, giving users a more immediate cue that something is changing.
a {
-webkit-transition-property: color;
-webkit-transition-duration:.4s;
-webkit-transition-timing:ease-out;
}
You can also combine these into a single CSS property by declaring the property, duration, and timing function in that order:
a { -webkit-transition: color .4s ease-out; }
The final product should be a red text link that subtly transitions to blue when users hover with their mouse pointer. This basic transitioning technique can be connected to an infinite amount of properties. Next, let’s let’s create a menu bar hover effect where border-thickness is combined with a .3 second transition.
To start, we’ll set a series of navigation links with a 3 pixel bottom border, and a 50 pixel border on hover:
border-nav a { border-bottom: 3px solid #e83119 }
border-nav a:hover { border-bottom: 50px solid #e83119 }
To bring the transition into the mix, let’s set a transition to gradually extend the border thickness over .3 seconds in a single line of CSS:
border-nav a { -webkit-transition: border .3s ease-out; }
Examples
This is just one example of how to use these transitions to enhance links and navigation items. Here are a few other sites with similar creative techniques:
Team Excellence
The webkit transition on all navigation items, including the main navigation set at .2s provides a nice effect without making visitors wait too long for the hover state.
Ackernaut
Ackernaut has subtle transitions on all link hovers, and extends the property to fade the site header in/out.
SimpleBits
The SimpleBits main navigation transitions over .2 seconds with linear timing.
DesignSwap
On DesignSwap, all text links have a .2 second transitions on hover and the swapper profiles fade out to real details about the latest designs.
Jack Osborne
Jack Osborne transitions all of the blue links as well as the post title link on his home page.
Eric E. Anderson
Eric E. Andersion has taken CSS3 implementation even further by implementing a transition on his main navigation for background color and color alongside border-radius and box-shadow.
Example #2: Background Clip
When connected to properties like text-shadow and @font-face, the background-clip property makes all things possible with type. To keep things simple, we’ll start with taking a crosshatch image and masking it over some text. The code here is pretty simple. Start by wrapping some HTML in a div class called bg-clip:
<div class="bg-clip"> <h3>kablamo!</h3> </div>
Now to the CSS. First, set the image you will be masking the text with as the background-image. Then, set the -webkit-text-fill-color to transparent and define the -webkit-background-clip property for the text.
.bg-clip {
background: url(../img/clipped_image.png) repeat;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
This opens the door for you to start adding texture or other graphic touches to your type without resorting to using actual image files. For even more CSS3 text experimentation, we can add the transform property to rotate the text (or any element for that matter) to any number of degrees. All it takes is a single line of CSS code:
-webkit-transform: rotate(-5deg); -moz-transform: rotate(-5deg); -o-transform: rotate (-5deg);
Note: While background-clip isn’t available in Firefox or Opera, the transform property is, so we’ll set this for each browser.
Examples
This is a fairly simple implementation, but there are quite a few really interesting and innovative examples of this technique:
Trent Walton
An experiment of my own, combining bg-clip and @font-face to recreate a recent design.
Neography
An excellent example of what is possible when you throw rotate, bg-clip and @font-face properties together.
Everyday Works
One of the earliest innovative implementations of CSS text rotation I’ve seen.
Panic Blog
The Panic blog randomly rotates divs / posts. Be sure to refresh to see subtle changes in the degree of rotation.
Sam Brown
Sam’s got a really nice text-rotate hover effect on the “stalk” sidebar links.
Example #3: CSS Transforms, Box Shadow and RGBa
What used to take multiple divs, pngs and extra markup can now be accomplished with a few lines of CSS code. In this example we’ll be combining the transform property from example 2 with box-shadow and RGBa color. To start things off, we’ll create 4 image files, each showing a different version of the Smashing Magazine home page over time with a class for the shadow and a specific class to achieve a variety of rotations.
Here’s the HTML:
<div class="boxes"> <img class="smash1 shadowed" src="../img/smash1.jpg" alt="2007"/> <img class="smash2 shadowed" src="../img/smash2.jpg" alt="2008"/> <img class="smash3 shadowed" src="../img/smash3.jpg" alt="2009"/> <img class="smash4 shadowed" src="../img/smash4.jpg" alt="2010"/> </div>
Let’s set up the CSS for the RGBA Shadow:
.shadowed {
border: 3px solid #fff;
-o-box-shadow: 0 3px 4px rgba(0,0,0,.5);
-moz-box-shadow: 0 3px 4px rgba(0,0,0,.5);
-webkit-box-shadow: 0 3px 4px rgba(0,0,0,.5);
box-shadow: 0 3px 4px rgba(0,0,0,.5);
}
Before moving forward, let’s be sure we understand each property here. The box-shadow property works just like any drop shadow. The first two numbers define the shadow’s offset for the X and Y coordinates. Here we’ve set the shadow to 0 for the X, and 3 for the Y. The final number is the shadow blur size, in this case it’s 4px.
RGBa is defined in a similar manner. RGBa stands for red, green, blue, alpha. Here we’ve taken the RGB value for black as 0,0,0 and set it with a 50% alpha level at .5 in the CSS.
Now, let’s finish off the effect by adding a little CSS Transform magic to rotate each screenshot:
.smash1 { margin-bottom: -125px;
-o-transform: rotate(2.5deg);
-moz-transform: rotate(2.5deg);
-webkit-transform: rotate(2.5deg);
}
.smash2 {
-o-transform: rotate(-7deg);
-moz-transform: rotate(-7deg);
-webkit-transform: rotate(-7deg);
}
.smash3 {
-o-transform: rotate(2.5deg);
-moz-transform: rotate(2.5deg);
-webkit-transform: rotate(2.5deg);
}
.smash4 {
margin-top: -40px;
-o-transform: rotate(-2.5deg);
-moz-transform: rotate(-2.5deg);
-webkit-transform: rotate(-2.5deg);
}
Examples
Here are a few additional sites with these properties implemented right now:
Butter Label
This site is jam packed with well-used CSS3. Notice the transform and box-shadow properties on the subscribe form.
Hope 140
Another site with plenty of CSS3 enhancements, Hope 140’s End Malaria campaign site features a collage of photographs that all have the same shadow & transform properties outlined in our example.
For A Beautiful Web
For A Beautiful Web utilizes RGBa and box-shadow for the overlay video clips boxes linked from their 3 master-class DVDs. While you’re there, be sure to note the transforms paired with the DVD packaging links.
Simon Collison
Simon Collison has implemented RGBa and box-shadow on each of the thumbnail links for his new website.
Example #4: CSS3 Animations
If you really want to push the envelope and truly experiment with the latest CSS3 properties, you’ve got to try creating a CSS3 keyframe animation. As a simple introduction, let’s animate a circle .png image to track the outer edges of a rectangle. To begin, let’s wrap circle.png in a div class:
<div class="circle_motion"> <img src="/img/circle.png" alt="circle"/> </div>
The first step in the CSS will be to set the properties for .circle_motion, including giving it an animation name:
.circle_motion {
-webkit-animation-name: track;
-webkit-animation-duration: 8s;
-webkit-animation-iteration-count: infinite;
}
Now, all that remains is to declare properties for each percentage-based keyframe. To keep things simple here, I’ve just broken down the 8 second animation into 4 quarters:
@-webkit-keyframes track {
0% {
margin-top:0px;
}
25% {
margin-top:150px;
}
50% {
margin-top:150px;
margin-left: 300px;
}
75% {
margin-top:0px;
margin-left: 300px;
}
100% {
margin-left:0px;
}
}
Examples
A few examples of CSS3 animations online now:
Hope 140
Hope 140 subtly animates their yellow “Retweet to Donate $10” button’s box shadow.
Hardboiled Web Design
Andy Clarke puts iteration count, timing function, duration and delay properties to good use when animating a detective shadow across the background of Hardboiled Web Design.
Optimum7
Anthony Calzadilla has recreated the Spider Man opening credits using CSS3 with JQuery and HTML5. You can also learn more about the process in his article “Pure CSS3 Spiderman Cartoon w/ jQuery and HTML5 – Look Ma, No Flash!”.
The Many Faces Of…
The Many Faces Of… animates the background position of a div to create an effect where characters creep up from the bottom of the page.
Trent Walton
I recently wrote a post about CSS3 usage, and animated a blue to green to yellow background image for the masthead.
OK, Dots Connected! Now What?
Yes, all of this CSS3 stuff is insanely exciting. If you’re like me, you’ll want to start finding places to use it in the real world immediately. With each new experimental usage come even more concerns about implementation. Here are a few of my ever-evolving opinions about implementing these properties online for your consideration.
- CSS3 enhancements will never take the place of solid user-experience design.
- Motion and animation demands attention. Think about a friend waving to get your attention from across a crowded room or a flashing traffic light. Heavy-handed or even moderate uses of animation can significantly degrade user experience. If you are planning on implementing these techniques on a site with any sort of A to B conversion goals, be sure to consider the psychology of motion.
- Don’t make people wait on animations. Especially when it comes to hover links, be sure there is an immediate state-change cue.
- Many of these effects can be used in a bonus or easter-egg type of application. Find places to go the extra mile.
This is a group effort. Don’t be afraid of failure, enlist the help of other developers, join the online discussions, and above all, have fun!
Further Reading
- Using CSS3 Transitions, Transforms and Animation
A very extensive and detailed overview of CSS3 techniques for transitions, transforms and animations, with numerous examples. - Sexy Interactions with CSS Transitions
many of us have never created animations in JavaScript, Flash or some other environment before, and are therefore not as well-versed in the unwritten rules of the animation world. This article explains how to create nice CSS transitions with CSS3. - Examples of CSS3 in the Wild
Showcase of sites using CSS3 properties. - CSS3 Transitions – Are We There Yet?
- Cross-Browser Animated CSS Transforms — Even in IE.
Related Articles
You may be interested in the following related posts:

































Karl
May 27th, 2010 2:40 aminteresting. Thanks
Steve
May 27th, 2010 2:53 amVery nice CSS Three overview Trend, but you missed this CSS Tranistion – Image Gallery ( sliding content without JavaScript).
Alex Hall
May 27th, 2010 2:54 amThe thing I love most about some of these examples is their subtlety, and the fact that, without them nothing’s changed except the smallest detail. For example, the ease of adding a fade effect to ALL links on your site with one line of CSS (this will change when other browsers catch up), is amazing! And it means that all browsers will have the hover change, some browsers will have that “extra special” effect. Progressive enhancement at it’s best.
Alan
May 27th, 2010 2:58 amExcellent tutorial on some of the new CSS3 things coming along, expecially love the border transition.
Tiago Simões
May 27th, 2010 3:07 amGreat article! We’re also using several CSS3 techniques for hovers on our new homepage
Gerwin Janssen
May 27th, 2010 3:34 amLast week I have made a ROFL COPTER animation in HTML5 and CSS3.
Check it out! http://www.webtuts.nl/ Don’t forget to ReTweet!
Philip
May 27th, 2010 4:01 amI notice the use of the new Google Font API there.. nice. Did I just notice it now or has it been in use for a while?
Smashing Editorial
May 27th, 2010 4:15 amWe’ve been using Google Fonts API for a while now. :-)
Andris
May 27th, 2010 4:03 amThis was a very interesting read. I’m coding a HTML5/CSS3 Website right now. Well I’m thinking about it. Your tipps come pretty handy.
Praveen Nair
May 27th, 2010 4:30 amExcellent stuff.. CSS3 yet to gain popularity among web designers, coz of the compatibility issues.. I loved all the stuff written in this post specially the background clip and shadow property. These will be very handy in future.
Thanks
Jesse @Everydayworks
May 27th, 2010 4:48 amTrent,
Great post. Thanks for linking to me.
It’s nice to see a collection of simple CSS 3 techniques that enhances a design and makes it less boring. These little tweaks applied to a site design can really make it interactive without the use of animation tools.
Josh
May 27th, 2010 5:00 amWhat browser are you testing in? I’m using firefox 3.6, and none of your effects are working.
Pedro Pinto
May 27th, 2010 6:15 amsame thing here..
Alan Hughes
May 27th, 2010 8:49 amYeah I am surprised they don’t work in Firefox yet, I never really pay attention to CSS3 because I know Microsoft won’t be on board for another decade or so, but I always assumed it all worked on Firefox until I checked this article out.
Jeff Boshers
May 27th, 2010 8:51 amMost of these effects don’t play nice with anything but webkit (Chrome, Safari).
Bingo Banger
May 27th, 2010 11:30 amSo this only works for 2% of the web users. Isn’t that great.
James Colyer
May 28th, 2010 7:35 amUmmm… Well yeah if you’re looking at it from only using CSS3 trickery for everything then yeah you’ve automatically limited yourself to a small % of screens out there. But I believe the true gist of the thing is that CSS3 can be used to add a little extra “special sauce” for those users who’s browsers can handle it and then you design to gracefully degrade and still provide a great UX for everyone else.
Alan
May 28th, 2010 12:50 pmYeah unfortunately that is the most optimistic view you can take on it, I know code specific web dudes feel that as long as it functions it is okay. But for more graphic design oriented web guys its like a slap in the face that your hard work will only appear correctly for a small percentage of people. If it doesn’t appear right, it isn’t functioning.
James Colyer
May 29th, 2010 4:31 am@alan – I totally understand your point, but my point was that if you design with CSS3 as a requirement then yes your design is going to look like yesterday’s dog food on a non-capable browser. Good design is good design and should be able to stand on the standards that are available to 70%+ of the browsers out there, again I see the CSS3 stuff as icing. I personally wouldn’t use the animation features in CSS3 as I agree with several others that animation is not styling. Instead I’d reserve that task for jQuery or another similar JS library.
devin
June 1st, 2010 3:45 ami agree with james, atleast firefox should be compatible for all this…..
marten
April 27th, 2011 3:15 ameven Firefox 4 doesn’t work with CSS3
Raphael Pudlowski
May 27th, 2010 5:05 amevery web designer must be aware that many of these features don’t work ewerywhere, and look different on different web browsers.
As for making an animation (like spiderman), it’s of the level flash animations was at their beginning, without the vector scalability :) And i don’t even mention that you have to code all by hand (no timeline, objects ect…) So no, don’t push css3 and html5 in a way where it shouldn’t be used…
Brad
May 27th, 2010 5:32 amI’m with Josh, I’m using Firefox 3.6.3 and I don’t see any transitions? What browser and OS are you using?
Trent Walton
May 27th, 2010 5:37 am@Josh & @Brad, These properties are currently only fully supported by -webkit browsers like safari or chrome. Sorry for the confusion. I’ve covered this a bit in the first 3-4 paragraphs of the article. Thanks for reading!
Brad
May 28th, 2010 4:57 amSorry for being the dumbass that didn’t read the whole article…
Steve
May 27th, 2010 5:39 am@Josh & Brad: CSS Tranistion for example will be surported by the Firefox-Version 3.7
Max
May 27th, 2010 5:45 amI believe these transitions, being webkit, will only work in Chrome and Safari. So those of you using Firefox, they won’t work quite yet.
mtrang
May 27th, 2010 6:01 amGreat post. I plan on using some transition effects for my social media icon links.
Amelia
May 27th, 2010 6:36 amI’m having the same problem as Josh has. Viewing it in Chrome 4 works beautifully, but not in FFox 3.6 or IE 8. Great post, thank you.
Mark
May 27th, 2010 6:57 amI really dislike the -o, -moz, and -webkit prefixes and duplicates in most CSS3 examples. This is not the way of how CSS should be typed (off-standards) and remind me of the scrollbar features from IE (oh it only works in ‘my browser’).
Terry
May 27th, 2010 7:12 amVery cool post, Trent! Thanks for leading the way in the use of CSS3.
Shaimifch
May 27th, 2010 7:22 amVery interesting.. bookmarked!
Tara
May 27th, 2010 8:21 amWhile I do think these effects are very, very cool, I cannot even begin to use them if they do not work in Firefox 3.6. I cannot assume that most users even have the updated version of Firefox!
Tephlon
May 28th, 2010 3:01 amActually, most FF3 user will update, as it’s extremely easy to do so. And FF nags you a bit until you do.
IE users on the other hand…
Dave
May 27th, 2010 8:45 amIt’s a great article – and there are some excellent resources – but unfortunately this is something that for the most part will see little use.
While gradual enhancement is a great idea at first, it just means that there’s more code to maintain – especially as more browsers support their own versions. Imagine having to maintain the keyframe animation if there was a -moz equivalent, and then a standard CSS one! No thanks.
Unfortunately, this article only serves to highlight (for me anyways) the horrible support for CSS3 that’s out and about now. I look forward to the day when browsers are more equal in their capabilities, and there’s less duplicate code to maintain.
Jim Hanifen
May 27th, 2010 10:42 amGreat post, so excited about CSS3, just need browser support and the web will change very quickly.
Webkit – why anything else!
Adam
May 27th, 2010 10:55 amPerhaps the code examples will be enough to get these effects across different browsers someday, but not today. I would like to see what we have to do today (and I’ll be eager to trim the solution back down to this simple and clean syntax when the browsers catch up!).
That is, I’d like to see a follow-up article detailing how to implement some of these effects (using JS, maybe even Flash) for browsers that don’t support these CSS3 properties, kind of a blend of this article and http://www.smashingmagazine.com/2010/04/28/css3-solutions-for-internet-explorer/ but also covering Firefox 3.6. I know not every effect is possible in every browser, but recommendations for graceful degradation / progressive enhancement would be useful. You’ve shown us what can be done for the bleeding edge browsers, please help us fill in the picture with a cross-browser solution and I bet we’ll see more people implementing these techniques sooner!
Victoria Fiorini
May 28th, 2010 6:02 amAdam, your way of thinking is all wrong. Why do you need someone else to tell you a solution to cross browser issues? You answered your own question, use JS. What is this “someday” business? Yeah these css3 techniques only work in web kit browser, but why can’t you design so your web site still functions and looks nice in a non-webkit browser? If you want to help technology advance you need to push people to start using the latest technologies. Reward those that use a webkit browser with a little something extra. Those that are using an out dated slacking browser technology most likely won’t care about what their missing anyways. It is an outdated thought that a website needs to look exactly the same in every browser. Today is the day, EVERYONE STOP SAYING SOMEDAY! Wouldn’t you rather start now, then all the sudden one day have to start using CSS3 and be way behind the learning curve?
Adam
May 28th, 2010 8:41 amVictoria, I’d prefer to say my way of thinking is practical. I agree with most of your principles, but the people who pay my salary (and I suspect the salaries of many other designers and developers) subscribe to the “outdated thought” that a website should look and behave consistently across browsers.
I know that developing for the lowest common denominator is too restrictive, but I also know that developing to take advantage of capabilities that aren’t widely supported would mean attempting to further educate employers on browser differences when they really don’t want to learn—they want it to Just Work™ (and they’ll be quick to measure CSS3 development as an expense against its impact for a rather small, albeit growing, audience segment).
The article paints a great picture of what can be achieved with a little experimentation and how we can give a little extra to the users with browsers that can support it. However, if we want the web community to embrace these techniques, I think we need articles that describe implementation in terms of problem solving (to be clear, I mean “in addition to,” not “instead of,” articles about experimentation).
I suppose we could also ask for more articles on how to effectively “push people to start using the latest technologies”—perhaps that’s what you’d advocate? I know I would need a technique besides implementing CSS3 with little graceful degradation: as I wrote, I can’t easily sell my employers on that. And, I suspect there are many users who don’t have a browser choice, no matter how we push.
And, I very much want the web community _at large_ to embrace CSS3. I’m ready to move beyond the sentiment that “HTML5/CSS3 is currently for personal/experimental sites”—and, when you write, “today is the day,” I know you agree.
Let’s say I have a design problem to solve. Let’s say the solution involves animation. Having read this article, I know I can implement it elegantly with CSS3 (for the few browsers that support it), and I’m excited to do so, but I still need a solution for everyone else. Don’t tell me I shouldn’t; it’s not a choice, I do need that solution. And, I want to implement that non-CSS3 solution in a way that can easily be peeled off or updated as more users update their browsers.
Yes, I did answer my own question in a rather vague way (“using JS”). And yes, I could fill in the specifics myself, designing so my “web site still functions and looks nice in a non-webkit browser.” Most of us could, to varying degrees of success.
[rant] Further: yes, we could keep these techniques to ourselves so everyone has to develop their own solution. Why? Because, apparently, if one of us suggested someone write an article about it and open it up for discussion and evolution within the web community, we would be told our way of thinking is all wrong! :P [/rant]
That’s more to my point: Smashing Magazine, in addition to showcasing the latest experiments and inspiring us, is, I think, one of the places where I can learn from what others have done. I hesitate to write “best practices,” but will write that the web community benefits from more specific advice than “use JS,” and can then test, debate, and evolve the solution to a “better practice” than what I could come up with on my own.
Smashing Magazine, the article is great and inspirational. Please empower those of us in the web community who have clients and bosses, who have users with outdated slacking browser technology, make today the day we use CSS3. I repeat: please help us by following this article up with strategies that get us closer to an acceptable cross-browser implementation.
Dan
May 28th, 2010 9:24 amPlain and simple, this article wasn’t about cross browser implementation, you’re missing the point. Your argument makes it sound like you want smashing magazine to tell you how to provide services to your clients equally so your boss won’t be upset.
Be creative, if your project absolutely needs an animation, obviously css3 isn’t the solution. I don’t think Trent presented it that way.
This article was meant to inspire creativity and thinking, not please show me how to do these things without css3. Please try to see the bigger picture here.
Chris Nager
May 27th, 2010 11:06 amThis is an excellent article, Trent. Very inspirational.
Brett
May 27th, 2010 11:10 amGreat article. I’m on the boat with most everyone that a lot of these techniques won’t be seen by many users/maintaining the code over time could be tedious. Yet I love to see people are willing to explore new methods. This is how we get innovation. If everyone was afraid to try something new, we would never make progress. I think the best thing about these techniques is a lot of them can be used right now, and if you clients browser doesn’t support one of the techniques, it really doesn’t take away in basic usability. It’s cool to see what can be done, yet it doesn’t really hurt anyone if in chrome your links fade in and out and in firefox 3.6 they don’t fade. Though I cant wait until CSS3 is more widely acceptable and all major browsers support it. I played around a little bit with the webkit-transition effect to change a background. It works fine on a solid color, and images, yet lately I’ve been using webkit-gradient to create a css based gradient for the background on some links. I wasnt able to get the transition effect to fade between two different instances, (a and a:hover) I have the webkit-gradient background set. Any thoughts?
Jason
May 27th, 2010 11:41 amNow if Mozilla, IE, Opera, etc. would start supporting these, life would be great.
butters
May 27th, 2010 12:57 pmis something suppose to be happening? None of the sites are doing anything, epic fail!
jkregala
May 28th, 2010 1:01 amUtilize a browser that supports CSS3 (Chrome, Opera)
Seb
May 27th, 2010 1:40 pmDid I miss the point? How is this CSS3? Oh, wait – it is not. It’s Browser specific. Sure, nice effects, but please point the rub:
1. It’s not CSS3. -moz and -webkit are browser-specific hacks. So, don’t sell it as CSS3
2. Your CSS won’t validate.
3. IE-users won’t see any of it, so cut at least 50% of the share. Probably more.
So, please tell me. How is this better than the IE-filters ten years ago?
John Faulds
May 28th, 2010 4:13 amBecause the -moz and -webkit properties have a real chance of becoming full CSS modules, just look at border-radius. And you’re wrong about these not being part of CSS3, see http://www.w3.org/TR/css3-background/ for background-clip and box-shadow for example.
Rakesh Kumar
May 27th, 2010 9:40 pmI agree that above mentioned css3 tricks are very cool and effective. But they are browser specific, in other word they are not supported to IE Browser and most of users use IE to visit the websites.
So, what is the solution of this?
Again, I very happy to read these article, but we have to find out the solution of browser compatibility. Otherwise css3 will not be popular.
Carlos Hermoso
May 27th, 2010 10:48 pmVery useful. Thanks for sharing this!
Sasha dal Ponte
May 27th, 2010 11:21 pmI don’t see the need for so many “standards”… Why browser programmers can’t come up with ONE standard that will be used and supported for all.
This way it’s just pain in the a@@ for us web designers…
LX
May 27th, 2010 11:26 pmSince browser support is but slowly catching, CSS3 is a perfect candidate for graceful degradation, i.e. a design that uses as many cool features as possible but just works in all clients.
Dhaval
May 27th, 2010 11:43 pmat “Eric E. Anderson” menu changed not as written and shown in image
check online
RCKY
May 28th, 2010 12:39 amWord up to the critical minds above!
As the css properties say (-webkit-…) they won’t work in IE or even gekko browsers. I cant see any of these css 3 features in my firefox (on mac). For shure it looks fine in in Safari … but dead ugly in others … so what? Don’t believe the hype!
David
May 28th, 2010 12:48 amImho, we should focus only on functionalities working on ie7+.
In a couple of years ie6 will be near to 0%
cooljaz124
May 28th, 2010 1:48 amGreat tips ;) But a bit too basic ;)
XLCowBoy
May 28th, 2010 3:07 amNow if only Chrome could work on the “jaggies” and support image profiles…
Lars Gunther
May 28th, 2010 4:41 amA lot of confused comments. Let me clarify ;-)
@Seb: CSS properties prefixed by -webkit-, -moz-, -ms-, -khtml- or -o- are experimental. They are subject to change and are usually being worked on by the CSS Working group, hence there is a need to use prefixes. But they are probably going to be part of a CSS 3 module and are thus not proprietary.
Remember: Nobody should rely on experimental features!
As for browser support. There are way too many examples on the web using webkit only prefixes, where there are equivalent implementations in Firefox (and Opera) as well, especially for transitions and gradients.
If you do a demo, please remove Webkit from arse and Google around a bit and find the equivalent feature in Firefox or Opera! And please don’t link to old demos, that were made before Firefox 3.6 and the latest Opera were released.
The one thing that Webkit has and nobody else so far is keyframe based animation. The CSS WG is working on drastic changes to the syntax (just like they did for gradients). I am working on moving this feature from CSS to the DOM: http://itpastorn.blogspot.com/2010/04/why-declarative-animation-should-be-in.html
Derek K
May 28th, 2010 6:01 amSo, I think aside from all the it doesn’t work in my browser (that’s because for the purposes of the demo it’s easiest to do it for one browser, if you want change the browser specific part to your browser of choice, you do code out the demos on your own machine right?) my only problem with some of the CSS3 features is that they leave the realm of style.
Most of the uses we’ve seen for the transitions and animations using CSS3 are very much behaviour or proper animation and should be done using behavioral tools or in an animation tool (which would then make the animated object a piece of content, moving it into the HTML via Object, Canvas or Video tags). Rotated content and background clipping is perfectly fine as style. And I’m not opposed to animations within CSS. But animation is not style.
dkardys
May 28th, 2010 6:51 amLeave no browser behind. I kindly request that as developers and designers we refuse to implement any CSS3 or HTML5 until each and every browser (and device) catches up and can support the standards. Only then can we responsibly push forward creatively with new technology. Until then, lets do what’s best for website users, and design for the most basic, but widely supported experience! Now who’s with me??!!
Mike D
May 28th, 2010 7:14 amRidiculous. Someone has to push innovation or it dies on the vine. With graceful degradation we can have our cake and eat it, too. I have no problem implementing CSS3 as long as it doesn’t hinder the user’s ability to view the content. If you are coding right, this will never happen.
Arlen
May 28th, 2010 7:31 am@dkardys — I sincerely hope you follow your own advice, and are not using CSS at all. Since IE6 doesn’t fully support CSS (and I mean *any* version of CSS) the position you advocate requires you not to use any version of CSS at all.
Didn’t think so.
In many ways, web development is like teaching. For example, every teacher has to plot a course between holding back every student in the class to the pace of the slowest student and leaving some students behind. The good teachers manage to give the faster students something to work on while spending some extra time with the slower ones.
That’s web dev. You don’t punish the folks who choose to use good browsers by making their experience look and feel like IE6. You toss them bits their browsers can use to make their experience better, while making sure the rest of the class gets the best their tired old browsers can handle.
James Colyer
May 28th, 2010 7:46 am@dkardys – thankfully humanity as a whole doesn’t have the limited vision described in your reply lest we’d still be living in caves scraping out whatever meager existence we could.
As web developers we must constantly push the envelope while still maintaining an excellent UX for all users. Well all users within reason, I personally do not support any version of IE less than 7 anymore in my projects or in the projects I design/build for my employer.
Innovate or die – that’s how Dad did it, that’s how America does it, and it’s worked out pretty well so far.
Derek K
May 28th, 2010 9:41 amI believe @dkardys is being sarcastic. Did no one else notice sarcastic undertones?
Paul Irish
May 28th, 2010 7:07 am@Lars, John, & Victoria: You guys rock. Keep educating. :)
@Trent, Great stuff. CSS Transitions are also in Firefox 3.7 and in Opera 10.50.
All, http://css3please.com should help you implement these css3 things in the best way possible. It’s kept up to date with browser support so you know you’ll be addressing all browsers that support a given property (like transition). It doesn’t have all things, missing some options and radial gradients, but I’m workin on it. :p
Trent Walton
May 28th, 2010 7:26 amThis isn’t about implementation as much as it is about experimentation and innovation. I hope readers will be encouraged to try something new with no guarantee that the result will succeed or be something they can implement right now. Progress is messy. Progress is risky. None of the examples I’ve given above are perfect… we all need to join together to help “connect the dots.”
Paul Irish
May 28th, 2010 9:40 amTruth! We need more people doing experiments like these around some of the racier css3 properties.
Dan
May 28th, 2010 7:27 amWow, if the readers here are the future of web design, things are shaping up to be quite sad. I feel like more than 90% of you who have commented only look at the pretty examples and don’t bother to read the informative area of content. There is useful information here people.
Stop reading these articles to look at how it is done and implement, to find out it “only” works with web-kit browsers (with those stupid -webkit prefixes). Then everyone complains about why aren’t there any examples of how to make this work with JS or Flash. These are not blanket principles here. Use your own discretion for when to implement such features. Trent was pretty specific in mentioning the caveats of using the demonstrated css3 examples. These are enhancements.
It is up to you to focus on user experience and remember that enhancements of any kind css3 or JS are there for enhancement not core functionality. Trent said “go the extra mile”, everyone bitches about IE why not reward users of modern browsers with a little bit of extra? Change your mind set, your aren’t limiting IE users, they still get a functioning web site, which should still look nice, modern browser users just get a little pretty on top of it all.
This is css3, these are vendor prefixes not hacks. Those who say otherwise are uninformed. These properties are still in development.
Jonathan Snook said:
“The point of a vendor prefix is to avoid a situation where an implementation changes before becoming a standard, thereby breaking all sites that come before it. This is a good thing. A vendor can continue to revise the syntax under a prefixed property without breaking things when they finally do become standard and implementations drop the vendor prefix.” – read VENDORS USING COMPETING PREFIXES @ snook.ca
IE filters were not a method of implementing future syntax still in development, they are solidified proprietary features built to only work with IE. Any browser could choose to adopt -webkit-opacity: but not the IE filter for opacity, this is a huge difference. IE filters are not CSS.
Stop complaining and start doing. Connect the dots as Trent has asked you to do.
PS: http://www.smashingmagazine.com/2010/04/28/css3-solutions-for-internet-explorer/ = most disappointing article on smashingmag ever.
Miba
May 28th, 2010 12:36 pmWhy nobody not use outline:none; to remove dots on linked objects when it’s clicked?
Mohammad Raihan Mazumder
May 29th, 2010 2:18 amDat’s nice info for do design in WEB!
Gabriel Sharp
May 31st, 2010 1:07 pmI’ve done this with the knowledge shared in this article:
http://eriksharp.com/gabs/sun/
Fabio
June 1st, 2010 8:01 amI think the techniques shown in this article are a little bit edgy, in that they mostly work only on webkit browsers, i’d rather suggest this article, focused on more basic css3 properties, already working in most bowsers:
http://www.smashingmagazine.com/2009/01/08/push-your-web-design-into-the-future-with-css3/
Guest
June 2nd, 2010 1:27 pmI’ll implement some of them, and invent others by myself.
ryan
June 6th, 2010 10:27 amInteresting. I enjoy designing with CSS and I actually just bought a book on CSS 3. I can’t wait until most of the browsers support. I am going to try and use the new css3 on my site http://wagnersportfolio.com. good post thank you.
Infodigests
June 8th, 2010 1:30 amGreat post with nicely explained examples.Very much interested in having a hands on experience.Much eager to watch out the race between CSS3 and UI frameworks.
David
June 14th, 2010 4:03 amHi! Thanks for the very thorough and interesting post. I found it concise and easy to digest; in a world where it’s easy to be confused by all the new features and combinations thereof. Thanks again, DC