![]() One of my favorite examples, this elegant animation pays close attention to detail. See the Pen Template: Logo by Alex Katz ( on CodePen. It’s another visual cue for users that makes navigating your website a tad more enjoyable. Hover-Responsive LogoĬheck out the logo in the bottom right corner of the pen below - this animation applies a subtle animation on mouse-hover. See the Pen Submit Button pure css animation by Dead Pixel ( on CodePen. This submit button is a clean, pleasing way to provide visual feedback indicating that an action has been completed, such as a form being submitted. Users appreciate the small, unexpected delight moments that savvy designers like to sprinkle throughout their web pages. See the Pen Text animation by Yoann ( on CodePen. ![]() Is your product efficient, user-friendly, and sustainable? Plug those words into an animation like this one. This is a common technique on websites that need to convey the versatility of their creations. SPARKLE GIF CODEScrolling Text AnimationĪnother cool way to enhance your text, this code snippet applies a slot-machine-like effect which rotates words in and out of view. See the Pen Simple HTML & SVG Loading Spinners by Stephen Delaney ( on CodePen. SPARKLE GIF HOW TOThis particular example also shows how to achieve a similar effect with a scalable vector graphic. Their meaning is almost universally understood, and they’re light on code as well. Simple Loading SpinnersĬSS animations can be used to create effects that we’re all familar with - these spinning load icons are one such example. See the Pen CSS mouse-out transition effect by Adam Argyle ( on CodePen. It’s a great way to add some extra flair to your page links. Starting things off light, this animation shows a simple but effective text highlight effect triggered by a mouseover action. SPARKLE GIF FREEFeel free to use them for inspiration in your own projects. CSS Animation Examplesīelow, we’ve compiled 24 CSS animation examples ranging from basic interaction effects to literal works of art (at least according to me). Documents with multiple types of animations may have multiple keyframes, each bound to a different element. In our example, we only have one keyframe. When these three properties are animated at once, it produces a coherent animation. The keyframe my-animation changes three style properties of our div: background-color, width, and top. A keyframe defines the animation’s starting state (inside from). The animation itself is created with a keyframe, indicated by the rule. Below that are several additional declarations that affect the timing and behavior of the animation. The most important declaration here is animation-name, which binds the keyframe my-animation to our div element. ![]() Looking at the CSS, we see that our animation declarations are associated with the div selector. In this example, is the element we’re animating. See the Pen CSS Animation Example by Christina Perricone ( on CodePen. ![]() To demonstrate, here’s a simple example of a CSS animation: You can also add declarations to further customize your animation, like speed and delay. To make a CSS animation, you need three things: an HTML element to animate, a CSS rule which binds the animation to this element, and a group of keyframes that defines the styles at the start and end of the animation. Since they don’t require extra scripts, CSS animations are unlikely to slow down your pages. GIFs) - everything is done with HTML and CSS.ĬSS animations are great for websites that want to add dynamic, engaging content without placing much more weight on the page. ![]() Pure CSS animations require no additional code (e.g. How do CSS animations work?ĬSS animation is a feature of CSS that allows you to animate a change in one or more style properties of an element, as well as control various aspects of the animation. That’s why we’ve compiled our favorite examples of CSS animation from CodePen - an online tool for creating and sharing code snippets in HTML and CSS - to help get the creative juices flowing.īut first, a brief review of the topic at hand. This extra bit of research can inspire your own projects and provide a sense of what you can accomplish with this powerful feature. If you want to add CSS animations to your work, it can be helpful to look at some successful uses of CSS animations first before diving in. While there are several ways to add animated graphics to a web page, one of the easiest is using CSS animations, which require nothing more than some HTML and CSS know-how to pull off. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |