concept motion in category css

appears as: motion, motion
CSS in Depth

This is an excerpt from Manning's book CSS in Depth.

With a CSS transition, you can tell the browser to “ease” one value into another when the value changes. For example, if you’ve blue links with a red hover state, a transition will cause the link to blend from blue through purple to red when the user mouses over—and back again when the user moves the mouse away. Used correctly, transitions can enhance the interactive feel of the page and, because our eyes are drawn to motion, can bring the user’s attention to a change as it occurs.

15.2. Transforms in motion

Transforms by themselves aren’t all that practical. A box with a skew() applied may look interesting, but it’s not exactly easy to read. But when used in conjunction with motion, transforms become much more useful.

Let’s build a page that makes use of this concept. A screenshot of the page you’ll make is shown in figure 15.5. You’ll be adding a lot of motion to this page.

Listing 15.4. Page markup for transforms in motion
<!doctype html> <html lang="en"> <head> <title>The Yolk Factory</title> <link href="https://fonts.googleapis.com/css?family=Alfa+Slab+One|Raleway" rel="stylesheet"> 1 <link rel="stylesheet" href="style.css"> </head> <body> <header> <h1 class="page-header">The Yolk Factory</h1> </header> <nav class="main-nav"> <ul class="nav-links"> <li> <a href="/"> <img src="images/home.svg" class="nav-links__icon"/> 2 <span class="nav-links__label">Home</span> 2 </a> </li> <li> <a href="/events"> <img src="images/calendar.svg" class="nav-links__icon"/> 2 <span class="nav-links__label">Events</span> 2 </a> </li> <li> <a href="/members"> <img src="images/members.svg" class="nav-links__icon"/> 2 <span class="nav-links__label">Members</span> 2 </a> </li> <li> <a href="/about"> <img src="images/star.svg" class="nav-links__icon"/> 2 <span class="nav-links__label">About</span> 2 </a> </li> </ul> </nav> </body> </html>