{"id":25620,"date":"2016-02-16T21:01:07","date_gmt":"2016-02-16T13:01:07","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=25620"},"modified":"2023-04-06T19:14:15","modified_gmt":"2023-04-06T11:14:15","slug":"visualizing-change-css-transitions-animations","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/visualizing-change-css-transitions-animations\/","title":{"rendered":"How to Use CSS Transitions &#038; Animations to Highlight Changes"},"content":{"rendered":"<p>Designers and artists have a long history of experimenting with motion, effects, and different kinds of illusions with the aim of adding an extra layer to their work. The <a href=\"https:\/\/www.thoughtco.com\/what-is-op-art-182388\" target=\"_blank\" rel=\"noopener nofollow\">op art<\/a> movement began to use optical illusions in the 1960s to give the impression of motion.<\/p>\n<p>Since then newer and newer approaches have popped up, such as the recently popular <a href=\"https:\/\/www.hongkiat.com\/blog\/kinetic-sculptures\/\" target=\"_blank\" rel=\"noopener\">kinetic art<\/a> that extends the viewer\u2019s perspective by using multidimensional movement. Motion also appeared in computer science with the <a href=\"https:\/\/www.google.com\/patents\/US3531796\" target=\"_blank\" rel=\"noopener\">invention<\/a> of the first blinking cursor in 1967.<\/p>\n<p>In front-end development DOM elements were usually <a href=\"https:\/\/javascript.info\/animation\" target=\"_blank\" rel=\"noopener\">animated by JavaScript<\/a> before CSS3 was released, and it\u2019s a method that still works, but the <strong>new properties introduced by CSS3 allows us to enhance our designs<\/strong> with different effects and motion <strong>in a more intuitive way<\/strong>.<\/p>\n<p>The two main techniques CSS3 offers are transitions and animations. In this post we will take a look at what they are, what is the difference between them, and how you can make use of them.<\/p>\n<h2>Transitions<\/h2>\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/CSS_Transitions\/Using_CSS_transitions\" target=\"_blank\" rel=\"noopener\">Transitions<\/a> and <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/CSS_Animations\/Using_CSS_animations\" target=\"_blank\" rel=\"noopener\">animations<\/a> are both used to <strong>visualize changes in the state<\/strong> of an HTML element by <strong>modifying one or more of its CSS properties<\/strong>.<\/p>\n<p>The simplest form of state change visualization is altering the colour of a button or a link when it\u2019s hovered on. When it happens, the element gets a slightly different style, which is usually noticed by the viewer as if something have moved on the screen.<\/p>\n<p>Changing CSS properties of a link on hover (or focus, or click) is the oldest and simplest form of transitions, and it existed well before the CSS3 era.<\/p>\n<pre>\r\na {\r\n\tcolor: orange;\r\n}\r\na:hover {\r\n\tcolor: red;\r\n}\r\na:focus {\r\n\tcolor: blue;\r\n}\r\na:visited {\r\n\tcolor: green;\r\n}<\/pre>\n<p>Transitions are used when an HTML element changes from one predefined state to another. CSS3 introduced new properties that allow more sophisticated visualizations than before, such as <a href=\"https:\/\/www.w3schools.com\/cssref\/css3_pr_transition-timing-function.asp\" target=\"_blank\" rel=\"noopener\">timing functions<\/a> or <a href=\"https:\/\/www.w3schools.com\/cssref\/css3_pr_transition-duration.asp\" target=\"_blank\" rel=\"noopener\">duration control<\/a>.<\/p>\n<p>We will take a look at the new CSS properties in the next section, after understanding how animations differ. For now, let\u2019s see the most important things you need to know about transitions.<\/p>\n<ol>\n<li>They always have a beginning and an end state.<\/li>\n<li>The states between the start and end points are implicitly defined by the browser, we can\u2019t change that with CSS.<\/li>\n<li>They require <strong>explicit triggering<\/strong>, such as adding a new pseudoclass by CSS, or a new class by jQuery.<\/li>\n<\/ol>\n<p>You can see a beautiful example of smartly utilized CSS3 transitions below, in which the author reveals hidden information in a way that\u2019s non-intrusive but still steers users\u2019 focus on the new content.<\/p>\n<p><iframe height=\"530\" scrolling=\"no\" src=\"https:\/\/codepen.io\/\/Hornebom\/embed\/pgioy\/?height=530&theme-id=0&default-tab=result\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"true\" style=\"width: 100%;\">See the Pen <a href=\"https:\/\/codepen.io\/\/Hornebom\/pen\/pgioy\/\" rel=\"nofollow\">css3 transitions <\/a> by Hornebom (<a href=\"https:\/\/codepen.io\/\/Hornebom\" rel=\"nofollow\">@Hornebom<\/a>) on <a href=\"https:\/\/codepen.io\/\" rel=\"nofollow\">CodePen<\/a>. <\/iframe><\/p>\n<h2>Animations<\/h2>\n<p>If we want to visualize state changes with more complicated movements, or if we don\u2019t have an explicit trigger, e.g. if we want to start the effect when the page loads, <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/CSS_Animations\/Using_CSS_animations\" target=\"_blank\" rel=\"noopener\">animations<\/a> are the way to go.<\/p>\n<p>Animations make it possible to define a more complex path by setting and configuring our own <code>keyframes<\/code>. <code>Keyframes<\/code> are intermediate points in the course of the animation, that allows us to change the style of the animated element as many times as we want.<\/p>\n<p>Although CSS3 offers great ways to build sophisticated animations, it\u2019s usually harder to create them than transitions, that\u2019s why there are many great <a href=\"https:\/\/www.hongkiat.com\/blog\/css3-animation-tools\/\" target=\"_blank\" rel=\"noopener\">animation libraries<\/a> out there, which can facilitate our work.<\/p>\n<p>The most important things you need to know about CSS3 animations include:<\/p>\n<ol>\n<li>they don\u2019t require explicit triggering, they can start on page load or when another <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/Events\" target=\"_blank\" rel=\"noopener\">DOM event<\/a> takes place in the browser<\/li>\n<li>they can be used in cases when transitions are used, for example when a new class or pseudoclass is added or removed (although it\u2019s a less frequent use case)<\/li>\n<li>they require us to define some keyframes (intermediate states)<\/li>\n<li>we can specify the number, the frequency, and the style of these keyframes<\/li>\n<\/ol>\n<p>In the example below you can see a cool animated dropdown menu. The animation starts when we click on the button. This is achieved by adding extra classes to the list elements with jQuery when the click event occurs.<\/p>\n<p>These new classes are animated with specified <code>@keyframes<\/code> rules in the CSS file. The extra classes are removed by jQuery when the user clicks on the button the next time, and the menu becomes hidden again.<\/p>\n<p><iframe height=\"450\" scrolling=\"no\" src=\"https:\/\/codepen.io\/\/MrBambule\/embed\/jIseg\/?height=450&theme-id=0&default-tab=result\" frameborder=\"no\" allowtransparency=\"true\" allowfullscreen=\"true\" style=\"width: 100%;\">See the Pen <a href=\"https:\/\/codepen.io\/\/MrBambule\/pen\/jIseg\/\" rel=\"nofollow\">Dropdown Menu Animation<\/a> by Karsten Buckstegge (<a href=\"https:\/\/codepen.io\/\/MrBambule\" rel=\"nofollow\">@MrBambule<\/a>) on <a href=\"https:\/\/codepen.io\/\" rel=\"nofollow\">CodePen<\/a>. <\/iframe><\/p>\n<h2>CSS Properties and The <code>@keyframes<\/code> At-Rule<\/h2>\n<p>For <a href=\"https:\/\/www.w3schools.com\/css\/css3_transitions.asp\" target=\"_blank\" rel=\"noopener\">transitions<\/a> we can use either the <code><a href=\"https:\/\/www.w3schools.com\/cssref\/css3_pr_transition.asp\" target=\"_blank\" rel=\"noopener\">transition<\/a><\/code> shorthand property, or 4 single transition-related properties: <code><a href=\"https:\/\/www.w3schools.com\/cssref\/css3_pr_transition-property.asp\" target=\"_blank\" rel=\"noopener\">transition-property<\/a><\/code>, <code><a href=\"https:\/\/www.w3schools.com\/cssref\/css3_pr_transition-duration.asp\" target=\"_blank\" rel=\"noopener\">transition-duration<\/a><\/code>, <code><a href=\"https:\/\/www.w3schools.com\/cssref\/css3_pr_transition-timing-function.asp\" target=\"_blank\" rel=\"noopener\">transition-timing-function<\/a><\/code>, and <code><a href=\"https:\/\/www.w3schools.com\/cssref\/css3_pr_transition-delay.asp\" target=\"_blank\" rel=\"noopener\">transition-delay<\/a><\/code>. The shorthand property contains all the single properties in an abbreviated form.<\/p>\n<p>For <a href=\"https:\/\/www.w3schools.com\/css\/css3_animations.asp\" target=\"_blank\" rel=\"noopener\">animations<\/a> there\u2019s the <code><a href=\"https:\/\/www.w3schools.com\/cssref\/css3_pr_animation.asp\" target=\"_blank\" rel=\"noopener\">animation<\/a><\/code> shorthand property at our hands which stands for none less than 8 single animation properties, namely <code><a href=\"https:\/\/www.w3schools.com\/cssref\/css3_pr_animation-name.asp\" target=\"_blank\" rel=\"noopener\">animation-name<\/a><\/code>, <code><a href=\"https:\/\/www.w3schools.com\/cssref\/css3_pr_animation-duration.asp\" target=\"_blank\" rel=\"noopener\">animation-duration<\/a><\/code>, <code><a href=\"https:\/\/www.w3schools.com\/cssref\/css3_pr_animation-timing-function.asp\" target=\"_blank\" rel=\"noopener\">animation-timing-function<\/a><\/code>, <code><a href=\"https:\/\/www.w3schools.com\/cssref\/css3_pr_animation-delay.asp\" target=\"_blank\" rel=\"noopener\">animation-delay<\/a><\/code>, <code><a href=\"https:\/\/www.w3schools.com\/cssref\/css3_pr_animation-iteration-count.asp\" target=\"_blank\" rel=\"noopener\">animation-iteration-count<\/a><\/code>, <code><a href=\"https:\/\/www.w3schools.com\/cssref\/css3_pr_animation-direction.asp\" target=\"_blank\" rel=\"noopener\">animation-direction<\/a><\/code>, <code><a href=\"https:\/\/www.w3schools.com\/cssref\/css3_pr_animation-fill-mode.asp\" target=\"_blank\" rel=\"noopener\">animation-fill-mode<\/a><\/code>, and <code><a href=\"https:\/\/www.w3schools.com\/cssref\/css3_pr_animation-play-state.asp\" target=\"_blank\" rel=\"noopener\">animation-play-state<\/a><\/code>.<\/p>\n<p>The most important thing with both transitions and animations is that we always <strong>need to specify the CSS properties that will be modified during the state change<\/strong>. With transitions it looks like this:<\/p>\n<pre>\r\n.element {\r\n\tbackground: orange;\r\n\ttransition-property: background;\r\n\ttransition-duration: 3s;\r\n\ttransition-timing-function: ease-in;\r\n}\r\n.element:hover {\r\n\tbackground: red;\r\n}<\/pre>\n<p>We specified the <code>background<\/code> property, because this is what will be changed during the transition.<\/p>\n<p>We can alter more than one CSS property in one transition, in this case the code above would be modified like this: <code>transition-property: background, border;<\/code>. We can also use the <code>transition-property: all;<\/code>, if we don\u2019t want to specify each property separately.<\/p>\n<p>We can choose the shorthand <code>transition<\/code> property as well. If we do so, we always need to pay attention to the proper order of the inner properties (see the syntax in the <a href=\"https:\/\/www.w3schools.com\/cssref\/css3_pr_transition.asp\" target=\"_blank\" rel=\"noopener\">docs<\/a>).<\/p>\n<pre>\r\n.element {\r\n\tbackground: orange;\r\n\ttransition: background 3s ease-in;\r\n}\r\n.element:hover {\r\n\tbackground: red;\r\n}<\/pre>\n<p>If we want to create an animation, we are required to specify the related <code>keyframes<\/code>. The CSS properties need to be modified in separately defined <code>@keyframes<\/code> <a href=\"https:\/\/developer.mozilla.org\/en\/docs\/Web\/CSS\/At-rule\" target=\"_blank\" rel=\"noopener\">at-rules<\/a>. Here is an example of how we can do this:<\/p>\n<pre>\r\n.element {\r\n\tposition: relative;\r\n\tanimation-name: slide;\r\n\tanimation-duration: 3s;\r\n\tanimation-timing-function: ease-in;\r\n}\r\n@keyframes slide {\r\n\t0% {\r\n\t\tleft: 0;\r\n\t}\r\n\t50% {\r\n\t\tleft: 200px;\r\n\t}\r\n\t100% {\r\n\t\tleft: 400px;\r\n\t}\r\n}<\/pre>\n<p>In the example above we created a very simple sliding effect. We defined the <code>animation-name<\/code>, then bound 3 keyframes to it which we specified in the <code>@keyframes slide { ... }<\/code> at-rules. The percentages refer to the duration of the animation, so 50% happens at 1.5s in the example.<\/p>\n<p>We could use the shorthand <code>animation<\/code> property as well, or could define the keyframes with the more simple <code>from {} to {}<\/code> rule in the following way:<\/p>\n<pre>\r\n.element {\r\n\tposition: relative;\r\n\tanimation: slide 3s ease-in;\r\n}\r\n@keyframes slide {\r\n\tfrom {\r\n\t\tleft: 0;\r\n\t}\r\n\tto {\r\n\t\tleft: 400px;\r\n\t}\r\n}<\/pre>\n<p>The creation of more complex animations is its own form of art, if you are interested, you can read two of our animation tutorials on <a href=\"https:\/\/www.hongkiat.com\/blog\/css3-animation-advanced-marquee\/\" target=\"_blank\" rel=\"noopener\">how to create an advanced marquee<\/a>, and <a href=\"https:\/\/www.hongkiat.com\/blog\/css3-bounce-effect\/\" target=\"_blank\" rel=\"noopener\">how to create a bounce effect<\/a>.<\/p>\n<p>When building transitions and animations, you need to know that <strong>not all CSS properties can be animated<\/strong>, so it\u2019s always a good idea to check the property you want to change in the <a href=\"https:\/\/www.w3schools.com\/cssref\/css_animatable.asp\" target=\"_blank\" rel=\"noopener\">CSS Animatable<\/a>.<\/p>\n<p>CSS3 animations and transitions worked with vendor prefixes for a long time, which we don\u2019t have to use any more, however the Mozilla Developer Network <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/CSS_Transitions\/Using_CSS_transitions\" target=\"_blank\" rel=\"noopener\">still recommends<\/a> to add the <code>-webkit<\/code> prefix for a while, as the support for Webkit-based browsers only recently achieved stability.<\/p>","protected":false},"excerpt":{"rendered":"<p>Designers and artists have a long history of experimenting with motion, effects, and different kinds of illusions with the aim of adding an extra layer to their work. The op art movement began to use optical illusions in the 1960s to give the impression of motion. Since then newer and newer approaches have popped up,&hellip;<\/p>\n","protected":false},"author":146,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3395],"tags":[507,4501],"topic":[4520],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Use CSS Transitions &amp; Animations to Highlight Changes - Hongkiat<\/title>\n<meta name=\"description\" content=\"Designers and artists have a long history of experimenting with motion, effects, and different kinds of illusions with the aim of adding an extra layer to\" \/>\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.hongkiat.com\/blog\/visualizing-change-css-transitions-animations\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use CSS Transitions &amp; Animations to Highlight Changes\" \/>\n<meta property=\"og:description\" content=\"Designers and artists have a long history of experimenting with motion, effects, and different kinds of illusions with the aim of adding an extra layer to\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/visualizing-change-css-transitions-animations\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2016-02-16T13:01:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-06T11:14:15+00:00\" \/>\n<meta name=\"author\" content=\"Anna Monus\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Anna Monus\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/visualizing-change-css-transitions-animations\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/visualizing-change-css-transitions-animations\\\/\"},\"author\":{\"name\":\"Anna Monus\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/a601053a0ab457901e00cdc83bd5359e\"},\"headline\":\"How to Use CSS Transitions &#038; Animations to Highlight Changes\",\"datePublished\":\"2016-02-16T13:01:07+00:00\",\"dateModified\":\"2023-04-06T11:14:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/visualizing-change-css-transitions-animations\\\/\"},\"wordCount\":1109,\"commentCount\":8,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"keywords\":[\"CSS\",\"CSS Tutorials\"],\"articleSection\":[\"UI\\\/UX\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/visualizing-change-css-transitions-animations\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/visualizing-change-css-transitions-animations\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/visualizing-change-css-transitions-animations\\\/\",\"name\":\"How to Use CSS Transitions & Animations to Highlight Changes - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"datePublished\":\"2016-02-16T13:01:07+00:00\",\"dateModified\":\"2023-04-06T11:14:15+00:00\",\"description\":\"Designers and artists have a long history of experimenting with motion, effects, and different kinds of illusions with the aim of adding an extra layer to\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/visualizing-change-css-transitions-animations\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/visualizing-change-css-transitions-animations\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/visualizing-change-css-transitions-animations\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use CSS Transitions &#038; Animations to Highlight Changes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/a601053a0ab457901e00cdc83bd5359e\",\"name\":\"Anna Monus\",\"description\":\"Anna is Technical Editor and Writer for Hongkiat.com. She mainly covers front-end frameworks, web standards, accessibility, WordPress development, and UX design.\",\"sameAs\":[\"https:\\\/\\\/www.annalytic.com\\\/\"],\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/anna_monus\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Use CSS Transitions & Animations to Highlight Changes - Hongkiat","description":"Designers and artists have a long history of experimenting with motion, effects, and different kinds of illusions with the aim of adding an extra layer to","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.hongkiat.com\/blog\/visualizing-change-css-transitions-animations\/","og_locale":"en_US","og_type":"article","og_title":"How to Use CSS Transitions & Animations to Highlight Changes","og_description":"Designers and artists have a long history of experimenting with motion, effects, and different kinds of illusions with the aim of adding an extra layer to","og_url":"https:\/\/www.hongkiat.com\/blog\/visualizing-change-css-transitions-animations\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2016-02-16T13:01:07+00:00","article_modified_time":"2023-04-06T11:14:15+00:00","author":"Anna Monus","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Anna Monus","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/visualizing-change-css-transitions-animations\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/visualizing-change-css-transitions-animations\/"},"author":{"name":"Anna Monus","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/a601053a0ab457901e00cdc83bd5359e"},"headline":"How to Use CSS Transitions &#038; Animations to Highlight Changes","datePublished":"2016-02-16T13:01:07+00:00","dateModified":"2023-04-06T11:14:15+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/visualizing-change-css-transitions-animations\/"},"wordCount":1109,"commentCount":8,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"keywords":["CSS","CSS Tutorials"],"articleSection":["UI\/UX"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/visualizing-change-css-transitions-animations\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/visualizing-change-css-transitions-animations\/","url":"https:\/\/www.hongkiat.com\/blog\/visualizing-change-css-transitions-animations\/","name":"How to Use CSS Transitions & Animations to Highlight Changes - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"datePublished":"2016-02-16T13:01:07+00:00","dateModified":"2023-04-06T11:14:15+00:00","description":"Designers and artists have a long history of experimenting with motion, effects, and different kinds of illusions with the aim of adding an extra layer to","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/visualizing-change-css-transitions-animations\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/visualizing-change-css-transitions-animations\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/visualizing-change-css-transitions-animations\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Use CSS Transitions &#038; Animations to Highlight Changes"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/a601053a0ab457901e00cdc83bd5359e","name":"Anna Monus","description":"Anna is Technical Editor and Writer for Hongkiat.com. She mainly covers front-end frameworks, web standards, accessibility, WordPress development, and UX design.","sameAs":["https:\/\/www.annalytic.com\/"],"url":"https:\/\/www.hongkiat.com\/blog\/author\/anna_monus\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-6Fe","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/25620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/146"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=25620"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/25620\/revisions"}],"predecessor-version":[{"id":65849,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/25620\/revisions\/65849"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=25620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=25620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=25620"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=25620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}