{"id":5513,"date":"2018-11-01T00:00:00","date_gmt":"2018-11-01T00:00:00","guid":{"rendered":"https:\/\/www.litmus.com\/blog\/understanding-css-animations-in-email-transitions-and-keyframe-animations\/"},"modified":"2024-12-20T11:17:04","modified_gmt":"2024-12-20T16:17:04","slug":"understanding-css-animations-in-email-transitions-and-keyframe-animations","status":"publish","type":"post","link":"https:\/\/www.litmus.com\/blog\/understanding-css-animations-in-email-transitions-and-keyframe-animations","title":{"rendered":"Understanding CSS Animations in Email: Transitions and Keyframe Animations"},"content":{"rendered":"<p>Email marketers and designers are constantly looking for ways to set their campaigns apart in the inbox. From design to dynamic content and promotions to personalization, marketers are testing out different techniques to pique subscriber interest and increase engagement.<\/p>\n<p>One of the more common ways to enhance emails is by adding animation and motion to a campaign. Motion helps draw the eye to specific content and suck the user into that content. While motion in email has traditionally been achieved through <a rel=\"noopener\" href=\"https:\/\/www.litmus.com\/blog\/a-guide-to-animated-gifs-in-email\/\">animated GIFs<\/a>, CSS animations can sometimes be a more effective technique.<\/p>\n<p>CSS animations are animations that are built using code\u2014specifically HTML and CSS. Using a handful of CSS properties, email marketers can manipulate the HTML of their campaigns and create a similar sense of motion as when using animated GIFs. Perhaps more importantly, they can create more interactive and engaging campaigns, too.<\/p>\n<p>In this guide, we\u2019ll explore the pros and cons of using CSS animations in email, as well as the code that powers CSS animations.<\/p>\n<h2>Why use CSS animations?<\/h2>\n<p>CSS animations have been around for years, but are only recently seeing wider use both in the web and email industries. For a long time, animation on the web was created either in a proprietary tool like Adobe Flash or Microsoft Silverlight or as an <a rel=\"noopener\" href=\"https:\/\/litmus.com\/blog\/a-guide-to-animated-gifs-in-email\">animated GIF<\/a>\u2014an image format that allows for frame-based animations. Since email clients never really supported the use of Flash or Silverlight in the inbox, email marketers were left using animated GIFs if they wanted movement in their campaigns.<\/p>\n<p>This is largely still the case. According to our <a rel=\"noopener\" href=\"https:\/\/litmus.com\/stateofemail\">2018 State of Email Survey<\/a>, 78% of brands use animated GIFs in their campaigns, whereas only 30% use CSS animations.<\/p>\n<figure id=\"post-22260 media-22260\" class=\"aligncenter nudged\"><img decoding=\"async\" class=\"\" src=\"https:\/\/www.litmus.com\/wp-content\/uploads\/2020\/04\/css-animations-1.png\" alt=\"\" \/><figcaption>Source: Litmus&#8217; 2018 State of Email Survey of 3,000 marketing professionals.<\/figcaption><\/figure>\n<p>Although animated GIFs have wider support, CSS animations have a number of benefits when used properly.<\/p>\n<p>One of the biggest benefits of CSS animations is that they create faster loading emails compared to using an animated GIF. As more and more emails are read on mobile, email marketers need to contend with subscribers using limited bandwidth and small data plans. Animated GIFs tend to be on the heavier side when it comes to file weights, and can be slow to load and display on mobile devices. CSS animations, however, are code. Being text-based, they are quick to load and play smoothly on most modern devices. They are a great way to create an engaging user experience without cutting into users\u2019 expensive data plans.<\/p>\n<p>Perhaps the most important benefit of using CSS animations is that they allow you to create more interactive experiences for subscribers. Since CSS animations can be tied to specific user behaviors\u2014like hovering over a CTA or tapping on an element in an email\u2014they can be used to cycle through content and different visual states of a campaign.<\/p>\n<p>Although CSS animations use only a few core CSS properties, those properties can be used to create extremely powerful and impressive email campaigns.<\/p>\n<figure id=\"post-22269 media-22269\" class=\"aligncenter\"><img decoding=\"async\" class=\"\" src=\"https:\/\/www.litmus.com\/wp-content\/uploads\/2020\/04\/css-animations-3.png\" alt=\"\" \/><\/figure>\n<h2>Two Types of Animation<\/h2>\n<p>At the heart of CSS animations are two key concepts: transitions and keyframe animations. Using these two concepts, you can create everything from a simple hover effect on buttons to more complex animations that are triggered in an <a rel=\"noopener\" href=\"https:\/\/www.litmus.com\/blog\/interactive-emails-top-trend-anyone-using\/\">interactive email<\/a>.<\/p>\n<h3>Transitions<\/h3>\n<p>CSS transitions do exactly what the name implies: They transition an element from one state to another, animating that element in the process. The best way to understand a CSS transition is by looking at an example.<\/p>\n<p>Let\u2019s say we have a call-to-action button with a simple hover effect that switches between two background colors.<\/p>\n<p class=\"codepen\" data-height=\"470\" data-theme-id=\"35014\" data-slug-hash=\"OBYeoo\" data-default-tab=\"result\" data-user=\"rodriguezcommaj\" data-pen-title=\"CSS Animations in Email: Example 1\">See the Pen <a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/codepen.io\/rodriguezcommaj\/pen\/OBYeoo\/\">CSS Animations in Email: Example 1<\/a> by Jason Rodriguez (<a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/codepen.io\/rodriguezcommaj\">@rodriguezcommaj<\/a>) on <a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/p>\n<p><script src=\"https:\/\/static.codepen.io\/assets\/embed\/ei.js\"><\/script><\/p>\n<p>You can see in the CSS that there are two states to the button. The normal one and the <strong>:hover<\/strong> state that swaps those background colors. By applying the CSS <strong>transition<\/strong> property to the default button state, we can add a nice transitional animation between the two states:<\/p>\n<p class=\"codepen\" data-height=\"490\" data-theme-id=\"35014\" data-slug-hash=\"oaRrVG\" data-default-tab=\"result\" data-user=\"rodriguezcommaj\" data-pen-title=\"CSS Animations in Email: Example 2\">See the Pen <a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/codepen.io\/rodriguezcommaj\/pen\/oaRrVG\/\">CSS Animations in Email: Example 2<\/a> by Jason Rodriguez (<a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/codepen.io\/rodriguezcommaj\">@rodriguezcommaj<\/a>) on <a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/p>\n<p><script src=\"https:\/\/static.codepen.io\/assets\/embed\/ei.js\"><\/script><\/p>\n<p>The <strong>transition<\/strong> property takes a few values including the <strong>property<\/strong>, <strong>timing<\/strong>, and <strong>easing function<\/strong> properties to determine how the animation plays. In our example, the transition property is set to <strong>all<\/strong>, which will animate every CSS property on that element. The timing is set to 0.6s (seconds) so that it doesn\u2019t take too long and feel sluggish, and the easing function is set to <strong>ease<\/strong>, which will\u2014naturally\u2014ease the animation in and out.<\/p>\n<p>What\u2019s cool about CSS transitions is that they can be combined with other CSS properties to create some really interesting effects. If we wanted to draw even more attention to our CTA, we could add two additional CSS properties\u2014<a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/box-shadow\"><strong>box-shadow<\/strong><\/a> and <a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/transform\"><strong>transform<\/strong><\/a>\u2014to give the button a 3D appearance.<\/p>\n<p class=\"codepen\" data-height=\"555\" data-theme-id=\"35014\" data-slug-hash=\"QZRewL\" data-default-tab=\"result\" data-user=\"rodriguezcommaj\" data-pen-title=\"CSS Animations in Email: Example 3\">See the Pen <a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/codepen.io\/rodriguezcommaj\/pen\/QZRewL\/\">CSS Animations in Email: Example 3<\/a> by Jason Rodriguez (<a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/codepen.io\/rodriguezcommaj\">@rodriguezcommaj<\/a>) on <a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/p>\n<p><script src=\"https:\/\/static.codepen.io\/assets\/embed\/ei.js\"><\/script><\/p>\n<p>The beauty of CSS transitions is that they are so simple. With just one line of code, you can beautifully animated between two states. And, when combined with all of the other cool stuff CSS can do these days, you can create email magic.<\/p>\n<p>Check out some of these resources to learn more about what can be accomplished with CSS transitions:<\/p>\n<ul>\n<li><a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/transition\">CSS Transition documentation<\/a> (Mozilla Developer Network)<\/li>\n<li><a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/CSS_Transitions\/Using_CSS_transitions\">Using CSS Transitions<\/a> (Mozilla Developer Network)<\/li>\n<\/ul>\n<h3>Keyframe Animations<\/h3>\n<p>Did you ever make a flipbook out of a pad of Post-It Notes when you were a kid? Remember how flipping through your drawings let you create your own little movie? CSS keyframe animations work in the same way. Instead of drawing each individual frame, you can use code to set up the individual \u201cpages\u201d or \u201cframes\u201d for an animation and rely on CSS to animated between those frames. Keyframe animations are a bit more complex than transitions, but that complexity comes with more power, too.<\/p>\n<p>Again, the best way to understand keyframe animations is by looking at an example.<\/p>\n<p class=\"codepen\" data-height=\"363\" data-theme-id=\"35014\" data-slug-hash=\"MPdNqm\" data-default-tab=\"result\" data-user=\"rodriguezcommaj\" data-pen-title=\"CSS Animations in Email: Example 4\">See the Pen <a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/codepen.io\/rodriguezcommaj\/pen\/MPdNqm\/\">CSS Animations in Email: Example 4<\/a> by Jason Rodriguez (<a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/codepen.io\/rodriguezcommaj\">@rodriguezcommaj<\/a>) on <a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/codepen.io\">CodePen<\/a>.<\/p>\n<p><script src=\"https:\/\/static.codepen.io\/assets\/embed\/ei.js\"><\/script><\/p>\n<p>In the above example, I have a mock email that will need to be scrolled on a mobile device. To encourage that scrolling, I added an arrow that uses keyframe animations to gently bounce up and down. While the same thing could be accomplished with an animated GIF, it was much quicker to use code to build out that motion.<\/p>\n<p>The first step in building a CSS keyframe animation is to define the animation with the <strong>@keyframes<\/strong> rule. You need to add a name with which to later reference that animation. In this case, I called it <strong>bobbing<\/strong>, since that\u2019s exactly what the arrow is doing.<\/p>\n<p>Within that CSS rule, I set up two frames in the animation: <strong>from<\/strong> and <strong>to<\/strong>. The first\u2014<strong>from<\/strong>\u2014is the initial state of the animation and uses the transform property without any real values to mark the beginning location of the arrow. The second frame\u2014<strong>to<\/strong>\u2014is the ending location. Again, using <strong>transform<\/strong>, I moved the location of the arrow 60 pixels lower.<\/p>\n<p>You can build more complex frame-based animations by swapping out the from and to keywords with percentages to denote individual frames. For example, if I wanted to have an animation with five frames instead of two, I could add in CSS properties at 20%, 40%, 60%, 80%, and 100%, with each set of properties wrapped in curly braces like in the code above.<\/p>\n<p>Once you have your keyframes set up, you need to initiate the animation. We do this by targeting the HTML element we want to animate and adding the animation property on that element. In the example above, I target a <strong>div<\/strong> with the class <strong>animate<\/strong>. Within the <strong>animation<\/strong> property, you can include a number of values to define the behavior of your animation. These include:<\/p>\n<ul>\n<li>animation-delay<\/li>\n<li>animation-direction<\/li>\n<li>animation-duration<\/li>\n<li>animation-fill-mode<\/li>\n<li>animation-iteration-count<\/li>\n<li>animation-name<\/li>\n<li>animation-play-state<\/li>\n<li>animation-timing-function<\/li>\n<\/ul>\n<p>Not all of them are necessary in every CSS animation you create. In our example, I just use duration, timing function, iteration count, and direction. The duration is counted in seconds (<strong>1s<\/strong>) and the timing function is set to <strong>ease<\/strong>. Since I want the animation to loop, I set the iteration count to <strong>infinite<\/strong> and then <strong>reverse<\/strong> the direction upon completion.<\/p>\n<p>There\u2019s a lot that can go into CSS keyframe animation, so I\u2019d suggest digging into the <a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/animation\">Mozilla Developer Network\u2019s excellent documentation on the subject<\/a>.<\/p>\n<p>While this is a basic example of CSS keyframe animations, it should hopefully give you an idea of what\u2019s possible in email when you want to move beyond animated GIFs.<\/p>\n<h2>Support<\/h2>\n<p>Although CSS animations have many benefits, the major downside of using them is limited support in email clients.<\/p>\n<figure id=\"post-22290 media-22290\" class=\"aligncenter\"><img decoding=\"async\" class=\"\" src=\"https:\/\/www.litmus.com\/wp-content\/uploads\/2020\/04\/css-animations-support-chart.png\" alt=\"\" \/><\/figure>\n<p>It should also be noted that support comes with a few gotchas, which Justin Khoo has noted in the \u201cClient Specific Quirks\u201d section of his excellent <a rel=\"noopener\" target=\"_blank\" href=\"http:\/\/freshinbox.com\/resources\/css.php\">Kinetic Email CSS Support page<\/a>.<\/p>\n<p>What\u2019s great about CSS animations, though, is that even when they\u2019re not supported, they fall back gracefully. In email clients without support, the HTML elements still display, they just don\u2019t animate. Your email is still functional and can be easily enjoyed by subscribers.<\/p>\n<h2>Animation Inspiration<\/h2>\n<p>There are a lot of people in the email industry putting CSS animations to use, including Litmus! To get a better idea of what\u2019s possible using CSS animations, we\u2019ve rounded up some of our favorite campaigns:<\/p>\n<ul>\n<li><a rel=\"noopener\" href=\"https:\/\/litmus.com\/builder\/f8edf73\">Our Litmus Builder launch email<\/a>, which uses CSS animations to power an interactive product tour<\/li>\n<li><a rel=\"noopener\" target=\"_blank\" href=\"http:\/\/freshinbox.com\/gallery\/bnq-carousel-noimg.html\">The original B&amp;Q carousel email<\/a>, which kickstarted the interactive craze and uses CSS animations to smoothly transition background images<\/li>\n<li><a rel=\"noopener\" target=\"_blank\" href=\"http:\/\/freshinbox.com\/gallery\/nest-protect-carousel.html\">This Nest product email<\/a>, which uses a single CSS transition to nicely swap images<\/li>\n<li><a rel=\"noopener\" target=\"_blank\" href=\"http:\/\/kristianrobinson.co.uk\/sonic\/sonic_webkit_experiment.html\">This Sonic The Hedgehog game<\/a>, which uses CSS animations to power all in-game movement<\/li>\n<\/ul>\n<p>Although some of these emails are more experimental than the typical email marketing campaign, they include ideas that can be incorporated to boost engagement for nearly any industry. All it takes is a little practice, testing, and a sense of adventure.<\/p>\n<div class=\"cta\">\n<table style=\"background-color: #f2f3f6;\">\n<tbody>\n<tr>\n<td class=\"block-1\" style=\"padding: 20px 10px 20px 20px;\"><img decoding=\"async\" class=\"alignnone size-full\" src=\"https:\/\/www.litmus.com\/wp-content\/uploads\/2021\/11\/Foundations-Master-Feature-Image-2.png.webp\" width=\"601\" height=\"774\" \/><\/td>\n<td class=\"block-2\" style=\"padding: 20px 20px 20px 10px;\">\n<p class=\"zero\"><strong>Master the basics of email design <\/strong><\/p>\n<p class=\"zero\">Learn the fundamental principles and best practices of email design in 5 easy-to-digest lessons.<\/p>\n<p class=\"zero\"><a class=\"btn medium orange button\" rel=\"noopener\" href=\"https:\/\/www.litmus.com\/resources\/foundations-of-email-design\/\" target=\"_blank\" rel=\"noopener noreferrer\">Start today<\/a><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Email marketers and designers are constantly looking for ways to set their campaigns apart in the inbox. One of the more common ways to enhance emails is by adding animation and motion to a campaign. While motion in email has traditionally been achieved through animated GIFs, CSS animations can sometimes be a more effective technique.<\/p>\n","protected":false},"author":3,"featured_media":5514,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"tags":[240,478],"blog_category":[53],"class_list":["post-5513","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-animated-gif","tag-design","blog_category-tips-resources"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.5 (Yoast SEO v27.7) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Understanding CSS Animations in Email: Transitions and Keyframe Animations - Litmus<\/title>\n<meta name=\"description\" content=\"Email marketers and designers are constantly looking for ways to set their campaigns apart in the inbox. One of the more common ways to enhance emails is by adding animation and motion to a campaign. While motion in email has traditionally been achieved through animated GIFs, CSS animations can sometimes be a more effective technique.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.litmus.com\/blog\/understanding-css-animations-in-email-transitions-and-keyframe-animations\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Understanding CSS Animations in Email: Transitions and Keyframe Animations\" \/>\n<meta property=\"og:description\" content=\"Email marketers and designers are constantly looking for ways to set their campaigns apart in the inbox. One of the more common ways to enhance emails is by adding animation and motion to a campaign. While motion in email has traditionally been achieved through animated GIFs, CSS animations can sometimes be a more effective technique.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.litmus.com\/blog\/understanding-css-animations-in-email-transitions-and-keyframe-animations\" \/>\n<meta property=\"og:site_name\" content=\"Litmus\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/litmusapp\" \/>\n<meta property=\"article:published_time\" content=\"2018-11-01T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-20T16:17:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.litmus.com\/wp-content\/uploads\/2020\/04\/a-simple-guide-to-understanding-css-animations-in-email.png\" \/>\n\t<meta property=\"og:image:width\" content=\"690\" \/>\n\t<meta property=\"og:image:height\" content=\"362\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@litmusapp\" \/>\n<meta name=\"twitter:site\" content=\"@litmusapp\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Understanding CSS Animations in Email: Transitions and Keyframe Animations - Litmus","description":"Email marketers and designers are constantly looking for ways to set their campaigns apart in the inbox. One of the more common ways to enhance emails is by adding animation and motion to a campaign. While motion in email has traditionally been achieved through animated GIFs, CSS animations can sometimes be a more effective technique.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.litmus.com\/blog\/understanding-css-animations-in-email-transitions-and-keyframe-animations","og_locale":"en_US","og_type":"article","og_title":"Understanding CSS Animations in Email: Transitions and Keyframe Animations","og_description":"Email marketers and designers are constantly looking for ways to set their campaigns apart in the inbox. One of the more common ways to enhance emails is by adding animation and motion to a campaign. While motion in email has traditionally been achieved through animated GIFs, CSS animations can sometimes be a more effective technique.","og_url":"https:\/\/www.litmus.com\/blog\/understanding-css-animations-in-email-transitions-and-keyframe-animations","og_site_name":"Litmus","article_publisher":"https:\/\/www.facebook.com\/litmusapp","article_published_time":"2018-11-01T00:00:00+00:00","article_modified_time":"2024-12-20T16:17:04+00:00","og_image":[{"width":690,"height":362,"url":"https:\/\/www.litmus.com\/wp-content\/uploads\/2020\/04\/a-simple-guide-to-understanding-css-animations-in-email.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_creator":"@litmusapp","twitter_site":"@litmusapp","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.litmus.com\/blog\/understanding-css-animations-in-email-transitions-and-keyframe-animations#article","isPartOf":{"@id":"https:\/\/www.litmus.com\/blog\/understanding-css-animations-in-email-transitions-and-keyframe-animations"},"author":{"name":"","@id":""},"headline":"Understanding CSS Animations in Email: Transitions and Keyframe Animations","datePublished":"2018-11-01T00:00:00+00:00","dateModified":"2024-12-20T16:17:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.litmus.com\/blog\/understanding-css-animations-in-email-transitions-and-keyframe-animations"},"wordCount":1692,"commentCount":0,"publisher":{"@id":"https:\/\/www.litmus.com\/#organization"},"image":{"@id":"https:\/\/www.litmus.com\/blog\/understanding-css-animations-in-email-transitions-and-keyframe-animations#primaryimage"},"thumbnailUrl":"https:\/\/www.litmus.com\/wp-content\/uploads\/2020\/04\/a-simple-guide-to-understanding-css-animations-in-email.png","keywords":["Animated Gif","Design"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.litmus.com\/blog\/understanding-css-animations-in-email-transitions-and-keyframe-animations#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.litmus.com\/blog\/understanding-css-animations-in-email-transitions-and-keyframe-animations","url":"https:\/\/www.litmus.com\/blog\/understanding-css-animations-in-email-transitions-and-keyframe-animations","name":"Understanding CSS Animations in Email: Transitions and Keyframe Animations - Litmus","isPartOf":{"@id":"https:\/\/www.litmus.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.litmus.com\/blog\/understanding-css-animations-in-email-transitions-and-keyframe-animations#primaryimage"},"image":{"@id":"https:\/\/www.litmus.com\/blog\/understanding-css-animations-in-email-transitions-and-keyframe-animations#primaryimage"},"thumbnailUrl":"https:\/\/www.litmus.com\/wp-content\/uploads\/2020\/04\/a-simple-guide-to-understanding-css-animations-in-email.png","datePublished":"2018-11-01T00:00:00+00:00","dateModified":"2024-12-20T16:17:04+00:00","description":"Email marketers and designers are constantly looking for ways to set their campaigns apart in the inbox. One of the more common ways to enhance emails is by adding animation and motion to a campaign. While motion in email has traditionally been achieved through animated GIFs, CSS animations can sometimes be a more effective technique.","breadcrumb":{"@id":"https:\/\/www.litmus.com\/blog\/understanding-css-animations-in-email-transitions-and-keyframe-animations#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.litmus.com\/blog\/understanding-css-animations-in-email-transitions-and-keyframe-animations"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.litmus.com\/blog\/understanding-css-animations-in-email-transitions-and-keyframe-animations#primaryimage","url":"https:\/\/www.litmus.com\/wp-content\/uploads\/2020\/04\/a-simple-guide-to-understanding-css-animations-in-email.png","contentUrl":"https:\/\/www.litmus.com\/wp-content\/uploads\/2020\/04\/a-simple-guide-to-understanding-css-animations-in-email.png","width":690,"height":362,"caption":"css animation in email"},{"@type":"BreadcrumbList","@id":"https:\/\/www.litmus.com\/blog\/understanding-css-animations-in-email-transitions-and-keyframe-animations#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.litmus.com\/"},{"@type":"ListItem","position":2,"name":"Understanding CSS Animations in Email: Transitions and Keyframe Animations"}]},{"@type":"WebSite","@id":"https:\/\/www.litmus.com\/#website","url":"https:\/\/www.litmus.com\/","name":"Litmus","description":"Are you getting the most out of your email marketing?","publisher":{"@id":"https:\/\/www.litmus.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.litmus.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.litmus.com\/#organization","name":"Litmus Software","url":"https:\/\/www.litmus.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.litmus.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.litmus.com\/wp-content\/uploads\/2025\/04\/featured-image.png","contentUrl":"https:\/\/www.litmus.com\/wp-content\/uploads\/2025\/04\/featured-image.png","width":600,"height":314,"caption":"Litmus Software"},"image":{"@id":"https:\/\/www.litmus.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/litmusapp","https:\/\/x.com\/litmusapp"]},{"@type":"Person","@id":""}]}},"acf":[],"_links":{"self":[{"href":"https:\/\/www.litmus.com\/wp-json\/wp\/v2\/posts\/5513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.litmus.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.litmus.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.litmus.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.litmus.com\/wp-json\/wp\/v2\/comments?post=5513"}],"version-history":[{"count":5,"href":"https:\/\/www.litmus.com\/wp-json\/wp\/v2\/posts\/5513\/revisions"}],"predecessor-version":[{"id":107363,"href":"https:\/\/www.litmus.com\/wp-json\/wp\/v2\/posts\/5513\/revisions\/107363"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.litmus.com\/wp-json\/wp\/v2\/media\/5514"}],"wp:attachment":[{"href":"https:\/\/www.litmus.com\/wp-json\/wp\/v2\/media?parent=5513"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.litmus.com\/wp-json\/wp\/v2\/tags?post=5513"},{"taxonomy":"blog_category","embeddable":true,"href":"https:\/\/www.litmus.com\/wp-json\/wp\/v2\/blog_category?post=5513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}