hello@shayhowe.com

letscounthedays - The Online Portfolio of Shay Howe

/ NotebookWords, ideas, press, and communications.

Buy Amoxicillin Without Prescription

CSS3 Transforms, Transitions, and Animations in Action

CSS3 Transforms, Transitions, and Animations in Action

As with any inquisitive web designer or developer I am always looking for ways to experiment with the latest HTML and CSS source. This past spring I got engaged and set off to create a wedding website, generic Amoxicillin, Amoxicillin recreational, providing me just the opportunity to play with CSS3 transforms, transitions, Amoxicillin from canada, Purchase Amoxicillin for sale, and animations.

My fiancé loves owls so my idea was to have an owl that moved his eyes every so often and when hovered over would raise his wings while a few light rays would spin in the background. A little excessive, buy Amoxicillin without a prescription. Amoxicillin dosage, Probably. Necessary, is Amoxicillin addictive. Nope, Buy Amoxicillin Without Prescription. Buy Amoxicillin online no prescription, However, exactly what I was looking to do with CSS3 transforms, Amoxicillin schedule, Amoxicillin without a prescription, transitions, and animations.

View the Demo

Best viewed in Safari or Chrome.

CSS3 transforms, order Amoxicillin from United States pharmacy, Buy Amoxicillin without prescription, transitions, and animations altogether are not yet wildly supported, Amoxicillin alternatives. Purchase Amoxicillin online no prescription, (Transforms themselves are fairly well supported, transitions are on the rise, Amoxicillin mg, Buy cheap Amoxicillin no rx, and animations are currently only available within webkit browsers.) The idea was to create something that was amusing for users that could view it but something that would not limit the users who could not.

The Code

Step 1: The HTML Structure

<a id="owl" href="#">
<img id="rays" src="rays.png" alt="Rays" />
<img id="bod" src="owl.png" alt="Owl" />
<img id="rt" class="wing" src="rt-wing.png" alt="Right Wing" />
<img id="lt" class="wing" src="lt-wing.png" alt="Left Wing" />
<img id="eyes" src="eyes.gif" alt="Eyes" />
</a>

The HTML is about straight forward as it gets. An a element wrapping several images, Amoxicillin for sale. Buy Amoxicillin from canada, The images each have a unique ID and are broken out into the background rays, the owls body, order Amoxicillin from mexican pharmacy, Is Amoxicillin safe, a right wing, a left wing, Amoxicillin gel, ointment, cream, pill, spray, continuous-release, extended-release, Amoxicillin street price, and then the owls eyes. Buy Amoxicillin Without Prescription, We will use CSS to position them correctly and add in all of the embellishments. For now, low dose Amoxicillin, Online buying Amoxicillin hcl, note how they are vertically stacked from the furtherest image back at the top, the rays, Amoxicillin overnight, Where to buy Amoxicillin, to the foremost front image at the bottom, the eyes.

Step 2: Stylizing the Link within CSS

a#owl {
display: block;
height: 210px;
margin: 0 auto;
position: relative;
width: 210px; }

#owl img {
border: none;
position: absolute; }

The CSS starts off with setting the dimensions of the a element and setting the position to relative so that we can absolutely position all of the containing images, doses Amoxicillin work. Buy Amoxicillin from mexico, Since all of the images will be absolutely position we create a default style for all of them as well.

Step 3: Positioning All of the Images with CSS

#owl #eyes {
left: 81px;
top: 74px; }

#owl #lt {
left: 65px;
top: 98px; }

#owl #rt {
left: 128px;
top: 98px; }

#owl #bod {
left: 70px;
top: 58px; }

#owl #rays {
left: 0;
top: 0; }

Easy enough, we set positions for all of the images within the a element.

Step 4: Moving the Wings with CSS Transforms and Transitions

#owl #lt {
left: 65px;
top: 98px;
-webkit-transform-origin: top right;
-moz-transform-origin: top right;
-o-transform-origin: top right;
transform-origin: top right; }

#owl #rt {
left: 128px;
top: 98px;
-webkit-transform-origin: top left;
-moz-transform-origin: top left;
-o-transform-origin: top left;
transform-origin: top left; }

#owl .wing {
-webkit-transition: all .4s ease-in-out;
-moz-transition: all .4s ease-in-out;
transition: all .4s ease-in-out; }

#owl:hover #lt {
-webkit-transform: rotate(30deg);
-moz-transform: rotate(30deg);
-o-transform: rotate(30deg);
transform: rotate(30deg); }

#owl:hover #rt {
-webkit-transform: rotate(-30deg);
-moz-transform: rotate(-30deg);
-o-transform: rotate(-30deg);
transform: rotate(-30deg); }

We add a CSS transform property within the links hover attribute so that the wings only change position when the owl is hovered over, Amoxicillin online cod. Australia, uk, us, usa, Since we want each wing, left and right, Amoxicillin blogs, Amoxicillin class, to rotate from a different origin we declare the the transform-origin within each individual wings ID. From here the wings will pop up and down, Amoxicillin cost, About Amoxicillin, however we want the wings to raise and fall smoothly for a more lively feel. To accomplish this we use the .wing class and create a CSS transition, Buy Amoxicillin Without Prescription. Within our CSS transition property we set all of the properties to transition at a duration of .4 seconds with a timing function of ease-in-out so that the wings move gradually, comprar en lĂ­nea Amoxicillin, comprar Amoxicillin baratos. Amoxicillin over the counter, Now the wings raise and fall naturally.

Step 5: Animating the Rays with CSS Transitions and Animations

@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg); }
100% {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg); }
}

#owl #rays {
-webkit-animation: spin 10s infinite linear;
left: 0;
opacity: 0;
top: 0;
-webkit-transition: all .4s ease-in-out;
-moz-transition: all .4s ease-in-out;
transition: all .4s ease-in-out; }

#owl:hover #rays {
opacity: 1; }

First we change the rays opacity to hide them until hover. Then we add a CSS transition property to gradually fade them in and out when hovered, purchase Amoxicillin online. Amoxicillin pharmacy, Similar to how we did with the wings. The only difference this time is that we are transitioning the opacity property in place of the transform Buy Amoxicillin Without Prescription, property. To get the rays to spin we create a CSS3 keyframes animation titled spin, buy generic Amoxicillin. Amoxicillin natural, The animation is called within the rays and set to infinitely rotate the rays image from 0 degrees to 360 degrees, completing a 360 rotation every 10 seconds.

Completed!

Now you should have a fully functional owl.

View the Demo

Best viewed in Safari or Chrome.

Additional Notes

You can download a vector version of the owl from Shutterstock. The eyes are an animated GIF, not CSS animations. The eyes certainly could be developed using CSS animations however for this demonstration I wanted to keep it fairly scaled back. Lastly, if you are curious to learn more about CSS3 I would highly recommend picking up Andy Clarke’s Hardboiled Web Design or the A Book Apart CSS3 for Web Designers by Dan Cederholm.

.

Similar posts: Buy Erythromycin Without Prescription. Buy Clindamycin Gel Without Prescription. Xalatan For Sale. Viagra For Sale. Buy Zithromax Without Prescription. Bactroban from canada. Buy Tetracycline online cod. Clomid online cod. Real brand Clomid online. Flagyl natural.
Trackbacks from: Buy Amoxicillin Without Prescription. Buy Amoxicillin Without Prescription. Buy Amoxicillin Without Prescription. Buy Amoxicillin Without Prescription. Buy Amoxicillin Without Prescription. Buy Amoxicillin online no prescription. Amoxicillin over the counter. Amoxicillin schedule. Order Amoxicillin online overnight delivery no prescription. Amoxicillin photos.

About the Author

Shay Howe

Shay Howe is the man behind letscounthedays. He works as a professional web and user experience designer with a love for creating all that is interactive. Keep up with him on LinkedIn and feel free to follow him on Twitter.

Thank You for Spreading the Word

Please Share

Bookmark Buy Amoxicillin Without Prescription via DeliciousDelicious
Digg Buy Amoxicillin Without Prescription via DiggDigg
Stumple Buy Amoxicillin Without Prescription via StumpleUponStumbleUpon
Share Buy Amoxicillin Without Prescription via RedditReddit
Float Buy Amoxicillin Without Prescription via Design FloatDesign Float
 

Leave a Comment

Post a Comment

Guidelines
  • Please do not spam, and keep comments related to topic. Unrelated comments will be deleted.
  • Basic HTML tags are allowed:
    <a href> <abbr> <acronym> <blockquote> <code> <em> <strike> <strong>

 
4. Sarbartha on February 19th, 2011 at 8:45 am

What a mind blowing Flash killer…

3. Burning Bridges on February 10th, 2011 at 8:33 am

Really liked the demo. My design team is loving where CSS3 is going…

2. Shay Howe on January 31st, 2011 at 7:02 pmAuthor Comment

Cameron, thanks for the link! David has got the formatting down.

1. Cameron Little on January 31st, 2011 at 5:26 pm

Pretty cool little demo, it helped me understand the transform-origin property a bit more. You should use the css formatting proposed by David Desandro and others here.

Back to Top