background preloader

Webdesigh

Facebook Twitter

Domeinnaam registreren? Registreer nu uw domeinnaam bij TransIP. CSS animations. CSS animations make it possible to animate transitions from one CSS style configuration to another.

CSS animations

Animations consist of two components, a style describing the CSS animation and a set of keyframes that indicate the start and end states of the animation's style, as well as possible intermediate waypoints along the way. There are three key advantages to CSS animations over traditional script-driven animation techniques: They're easy to use for simple animations; you can create them without even having to know JavaScript. The animations run well, even under moderate system load. Simple animations can often perform poorly in JavaScript (unless they're well made). Configuring the animation To create a CSS animation sequence, you style the element you want to animate with the animation property or its sub-properties. The sub-properties of the animation property are: animation-delay Configures the delay between the time the element is loaded and the beginning of the animation sequence.

Examples. A Quick Lesson in CSS3 Animation. Hey guys! Long time no post… I’ve been busy working on awesome client projects as well as crafting an identity for my new company: Rocket Mouse Design . Over the weekend I wanted to whip up a simple landing page with some simple CSS3 animation. I learned a few things along the way and wanted to share. Not So Simple… So I have a rocket in my logo (which is still a work in progress). What I wanted to do was translate the position of the rocket after a few seconds (or on hover) and make it fly off the screen. #rocket { -webkit-transition: 1s; This makes the animation take 1 second. And then on hover make it fly off the screen. Body:hover #rocket { -webkit-transform: translate(0,-600px); Check it out in action: Wait… Rockets Don’t Do That… CSS Cheat Sheet. Web Fonts. Creating A Free Website. Learn CSS Positioning in Ten Steps: position static relative absolute float.

1. position:static The default positioning for all elements is position:static, which means the element is not positioned and occurs where it normally would in the document.

Learn CSS Positioning in Ten Steps: position static relative absolute float

Normally you wouldn't specify this unless you needed to override a positioning that had been previously set. 2. position:relative If you specify position:relative, then you can use top or bottom, and left or right to move the element relative to where it would normally occur in the document. Let's move div-1 down 20 pixels, and to the left 40 pixels: Notice the space where div-1 normally would have been if we had not moved it: now it is an empty space. It appears that position:relative is not very useful, but it will perform an important task later in this tutorial. 3. position:absolute When you specify position:absolute, the element is removed from the document and placed exactly where you tell it to go. Let's move div-1a to the top right of the page: What I really want is to position div-1a relative to div-1.

Footnotes 10.