(Close)
Forgot password?
Join Now! Watch Tutorials
macProVideo.com
Close

Free Premium Access

Access our entire library of Premium Hub Articles, Project Files and the first 10% of each Tutorial-Video from the Online Tutorial Library.

Create your FREE Account now!

Already a member? Login

Categories

Related Articles

  • Using Webfonts For Terrific Type Online
  • by Iain Anderson
  • Don't know your TrueType from your WOFF? Got EOT and SVG in a twist? Or perhaps you just want to learn how to get hold of excellent pre-made fonts and generate your own… Iain Anderson types it out.
  • Create an Apple iOS Icon for Your Website
  • by Toby Pitman
  • You have a website. Check. It works great on iOS devices. Check. If someone bookmarks it to the Home screen your custom icon appears. Not sure how to do that? This tutorial is for you.
  • Getting Started in Adobe BrowserLab
  • by Geoff Blake
  • In this post we'll be taking a look at BrowserLab. What the heck is BrowserLab? It's a tool for web designers, which allows them to preview their work in a variety of browsers, on different platforms.
  • Setting Up Tiled Backgrounds Using CSS
  • by Geoff Blake
  • Setting up tiled backgrounds via CSS is a great way to add visual appeal to your website and to layout components that make up your overall design. The good news is, it's super easy, and there are som

Related Tutorial-Videos

  • Cubase 6.5
  • New Features In Cubase 6.5
  • 64 bit Cubase 6.5 is here with its new synths: Retrologue and Padshop. There’s also a new Comping tool and some very cool new effects plugins. So join Cubase “Commander” Matthew Loel T. Hepworth, your captain on flight Cubase 6.5, to learn what’s new...
  • Pro Tools 10 113
  • Pro Mixing Techniques
  • Mixing sounds to create a cohesive and inspiring piece of music is an art. Join MPV trainer and Pro Tools expert Mike Watkinson as he reveals his favorite mixing techniques and shows you how you can bring your musical canvases to life...
  • Melodyne 201
  • Advanced Melodyne
  • Melodyne 2.0 is loaded with a bunch of new features. Let Product Specialist David Andris show you how you can inject Melodyne’s new DNA technology into your productions...
  • SongCraft
  • Producing Lauren Balthrop
  • One song and only one day to professionally produce it! Can it be done? Find out as the pros at Dubway Studios in New York City take you on a recording and mixing adventure in this first edition of our new Docu-Tutorial series we call SongCraft!
  • Native Instruments 201
  • Razor
  • Native Instruments’ Razor is a totally slick additive synthesis machine. See all the different ways you can slice this knife of a synth into your tracks in this 40-plus video tutorial by expert synthesist G.W. Childs...
  • Native Instruments 210
  • FM8: FM Synthesis and Sound Design
  • Join Synth Expert David Earl (a.k.a. SFLogicNinja) and discover how incredibly powerful and rich FM synthesis can be when using the amazing FM8 synth from Native Instruments...
  • Pro Tools 10 112
  • Advanced Editing Techniques
  • Becoming a Pro Tools editing Ninja requires mastering the tools of the trade. Join Certified Avid trainer Mike Watkinson as he explores the art of editing and managing clips in Avid’s Pro Tools 10...
  • Native Instruments 211
  • Guitar Rig and The Studio Processors
  • Native Instruments' Guitar Rig isn't just for guitars. It's an amazingly versatile plugin "rig" that can be used on just about any track from vocals to mastering. Join Music Software Expert Mo Volans as he shows you the amazing new collection of studio quality Effect Processors that come with Guitar Rig 5 Pro...
  • Jul 25, 2011
Have Some Fun With CSS3 Transitions
  • Genre: Web
  • Level: Intermediate
  • Time to Complete: 15-30 minutes
  • 0 comments — Start Discussion

It seems that browser vendors are really pushing new CSS3 features through at a pretty fast pace despite CSS2.1 only just having been finalized.

Even though CSS3 is years away from being finished most modern browsers have been implementing it for a while. In this quick tip I’ll show you a neat little roll-over effect using CSS3 Transitions. 


Step 1

I have some very simple markup here. Just an unordered list with some links in.:


I’ve put the link tags inside some span tags purely for backwards compatibility. I know it’s not strictly semantic but if you want this to work in IE6 (Shakes fist!!!) this is how you’ll need to mark it up as IE6 (Shakes fist!!!) will not understand :hover on anything other than link tags. For IE7 you’ll need to make sure to declare a doctype for :hover to work on non-link elements. Pathetic, I know!

I’ve applied some simple styling to make a horizontal navigation bar. 


This is the result:


I’ve applied display: inline; to the list tags to prevent some layout issues in IE6 (Shakes fist!!!).


Step 2

Now I’m going to apply a background image to my link tags:


This is the result:


I know this looks a bit weird but bear with me. The image is positioned using the background shorthand rule.

background: ;


Step 3 

Now I can style the span tags.


This is the result.


You’ll notice that the link tags' background image is now hidden by the background color of the span tag which is sitting on top of it. The span tag is also 20px smaller in height than the link tag. This is important!


Step 4

Now I’ll apply the :hover rule to my link tag. This will cause the link tags background image to move 10px downwards, essentially revealing it when you mouse over the link.


This is the result.


At this point you're essentially in fallback mode. The current markup should work in every known browser. Any code I add from now on will be CSS3 and support will vary from browser to browser.


Step 5

Now I’ll add my CSS3 Transition rule to the link tags.


Here’s how it works. 

transition: 

all (apply to all CSS properties of this element)

.3s (the time for the transition)

linear (the timing curve of the transition)


Now any change in the properties of the link tags (on ‘hover’) will transition smoothly to its new value. Namely the background position and the text color.

You’ll notice also that there are quite a few vendor prefixes for CSS Transitions. Each browser currently implements this effect in different ways so we need to target as many as we can. 


-moz- = Mozilla Firefox

-webkit- =Safari, Chrome

-o- = Opera


Once this is finalized it will become simply ‘transition’.


Step 6

Finally I’ll add some quick rounded corners.


This is the result:


Compatibility

  • This should work well in Firefox, Safari and Chrome. 
  • Opera does support CSS3 Transitions but not yet on background-position. 
  • Hopefully we’ll see this in Internet Explorer in about the year 3038. But don’t bet on it!!


Conclusion

This concept can be applied to loads of roll-over effects. In the download below you’ll find some more examples including this effect where when you roll over an album it shows you the format CD, Vinyl with a nice transition.


DOWNLOAD SPECIAL CSS3 EXAMPLES HERE.

Play about and have some fun & check out this CSS Floating Layouts Title.



Toby Pitman

Toby Pitman

Toby composes, records, performs and produces music in every possible style all over the world for TV shows, advertising and for recordings. Over his 18 year professional career Toby has worked with many major recording artists including George Michael, David Arnold, Yussif Islam (Cat Stevens), Giles Martin and Shirley Bassey. Toby is also a Logic Pro master, expert synthesist and sound designer. Toby's passion for music education has led him to teach for The International Guitar Foundation and the Brighton Institute of Modern Music.

Comments

You must be logged in to post a comment.
Create an Account  Login Now

What is macProVideo.com?

macProVideo.com is an online education community featuring Tutorial-Videos & Training for popular Audio & Video Applications including Adobe CS, Logic Studio, Final Cut Studio, and more.
© 2012 macProVideo.com
a division of NonLinear Educating Inc.

About

Our Plans

Tutorials

Community

Help

Legal

Link