{"id":575,"date":"2023-02-20T09:58:54","date_gmt":"2023-02-20T09:58:54","guid":{"rendered":"https:\/\/zaraknox.co.uk\/journal\/?p=575"},"modified":"2023-03-10T13:28:26","modified_gmt":"2023-03-10T13:28:26","slug":"article-css-animations","status":"publish","type":"post","link":"https:\/\/zaraknox.co.uk\/journal\/2023\/02\/20\/article-css-animations\/","title":{"rendered":"Article &#8211; CSS Animations"},"content":{"rendered":"\n<h2><strong>What is CSS animation?<\/strong><\/h2>\n\n\n\n<p>CSS animations are a way to add movement and interactivity to web pages using only CSS code, without the need for JavaScript or other programming languages. With CSS animations, we can create dynamic effects such as moving text and images, colour and font changes, and plenty of other visual touches.<\/p>\n\n\n\n<p>CSS is a powerful tool that is often capable of more than we can imagine. Andy Clarke\u2019s take on the AMC show <em>Mad Men<\/em>&#8216;s opening credits is a testament to what CSS can accomplish:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/madman-1024x577.png\" alt=\"\" class=\"wp-image-588\" width=\"518\" height=\"291\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/madman-1024x577.png 1024w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/madman-300x169.png 300w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/madman-768x432.png 768w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/madman-1536x865.png 1536w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/madman-2048x1153.png 2048w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/madman-1200x676.png 1200w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/madman-1980x1115.png 1980w\" sizes=\"(max-width: 518px) 100vw, 518px\" \/><figcaption class=\"wp-element-caption\"><a href=\"https:\/\/jterweeme.github.io\/madmanimation\/animatie.html\" data-type=\"URL\" data-id=\"https:\/\/jterweeme.github.io\/madmanimation\/animatie.html\" target=\"_blank\" rel=\"noreferrer noopener\">View Madmanimation on GitHub<\/a><\/figcaption><\/figure><\/div>\n\n\n<p><\/p>\n\n\n\n<h2><strong>Why use CSS animation?<\/strong><\/h2>\n\n\n\n<p>There are several reasons why you might want to use CSS animations in your web design:<\/p>\n\n\n\n<ol>\n<li><em>Eye-catching visuals<\/em>: CSS animations can make your website more visually appealing and engaging for users. Animations can help to draw attention to important elements on the page, and create a sense of interactivity that can make the user experience more enjoyable.<\/li>\n\n\n\n<li><em>Improved user experience<\/em>: Animations can also be used to improve the user experience by providing visual feedback when a user interacts with a particular element on the page. For example, when a user hovers over a button, the button might change colour or move slightly, giving the user a sense of feedback that their action has been registered.<\/li>\n\n\n\n<li><em>Cross-browser compatibility<\/em>: CSS animations are supported by all modern browsers. Older browsers can be accounted for with vendor prefixes, which we will cover later on.<\/li>\n\n\n\n<li><em>Performance<\/em>: Because CSS animations are native to the browser, they tend to be faster and more efficient than animations created using JavaScript. This can help to improve the performance of your website and ensure that it loads quickly for users. Also, why use the most fragile layer to create animations when we can make them using CSS, the more robust layer?<\/li>\n<\/ol>\n\n\n\n<h2><strong>How to use CSS animation<\/strong><\/h2>\n\n\n\n<p>Before we jump into some animations, let\u2019s take a look at what CSS technologies are available to us and how they work.<\/p>\n\n\n\n<p><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"788\" height=\"150\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-18-at-15.43.07-1.png\" alt=\"\" class=\"wp-image-579\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-18-at-15.43.07-1.png 788w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-18-at-15.43.07-1-300x57.png 300w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-18-at-15.43.07-1-768x146.png 768w\" sizes=\"(max-width: 788px) 100vw, 788px\" \/><\/figure><\/div>\n\n\n<p>The transform property is an extremely useful tool that allows us to move, resize, rotate, and skew HTML elements on the page. It should be noted that while transforms change how the element is displayed, it is does not create \u2018movement\u2019 or animation when used by itself. The trick is to combine the transform property with a transition or keyframe animation.<\/p>\n\n\n\n<p>The following functions can be performed with transform:<\/p>\n\n\n\n<p><code>translate<\/code>: Relocates the element on the page. This can be done on the horizontal axis with <code>transform: translateX()<\/code>, the vertical axis with <code>transform: translateY()<\/code>, or both the X and Y axis with <code>translate()<\/code>.<\/p>\n\n\n\n<p><code>scale<\/code>: Makes an element appear larger or smaller. You can provide a ratio with scale, such as <code>transform: scale(1.5)<\/code>. This would make the element 150% larger than its original size.<\/p>\n\n\n\n<p><code>skew<\/code>: Changes the angle of the element\u2019s axis by a specified number of degrees, stretching it out accordingly. In other words, it makes the element \u2018slanty\u2019. You can do this on the horizontal axis with <code>scaleX()<\/code>, vertically with <code>scaleY()<\/code>, or both with <code>scale()<\/code>.<\/p>\n\n\n\n<p><code>rotate<\/code>: Tilts the element\u2019s angle clockwise with a positive degree value, or anti-clockwise with a negative degree value. For example, to rotate an element by 45 degrees, you would write <code>transform: rotate(45deg)<\/code>.<\/p>\n\n\n\n<p>Here\u2019s a quick look at how we can apply multiple transforms to manipulate an image of a cloud:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/03\/cloud-1024x606.png\" alt=\"\" class=\"wp-image-675\" width=\"489\" height=\"288\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/03\/cloud-1024x606.png 1024w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/03\/cloud-300x178.png 300w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/03\/cloud-768x454.png 768w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/03\/cloud-1536x909.png 1536w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/03\/cloud-2048x1212.png 2048w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/03\/cloud-1200x710.png 1200w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/03\/cloud-1980x1172.png 1980w\" sizes=\"(max-width: 489px) 100vw, 489px\" \/><\/figure><\/div>\n\n\n<p>If we wanted to move the cloud to the right, make it smaller, and rotate it slightly, we could write:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/transform-code.png\" alt=\"\" class=\"wp-image-582\" width=\"547\" height=\"107\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/transform-code.png 918w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/transform-code-300x59.png 300w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/transform-code-768x151.png 768w\" sizes=\"(max-width: 547px) 100vw, 547px\" \/><\/figure><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/transformedcloud-1024x482.png\" alt=\"\" class=\"wp-image-591\" width=\"506\" height=\"238\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/transformedcloud-1024x482.png 1024w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/transformedcloud-300x141.png 300w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/transformedcloud-768x361.png 768w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/transformedcloud-1536x723.png 1536w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/transformedcloud-2048x964.png 2048w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/transformedcloud-1200x565.png 1200w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/transformedcloud-1980x932.png 1980w\" sizes=\"(max-width: 506px) 100vw, 506px\" \/><\/figure><\/div>\n\n\n<p>The result is a cloud that has been moved 500px to the right, scaled to half its size, and rotated to a 30 degree clockwise angle.<\/p>\n\n\n\n<p><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"782\" height=\"152\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-18-at-15.43.41.png\" alt=\"\" class=\"wp-image-585\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-18-at-15.43.41.png 782w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-18-at-15.43.41-300x58.png 300w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/Screenshot-2023-02-18-at-15.43.41-768x149.png 768w\" sizes=\"(max-width: 782px) 100vw, 782px\" \/><\/figure><\/div>\n\n\n<p>Transitions in CSS are an integral part of animation and are often used in conjunction with the transform property to create smooth and fluid transitions between different states of an element.<\/p>\n\n\n\n<p>Transitions allow you to specify how an element\u2019s property should change over time, and is activated when a user interacts with the element, such as hovering over it or clicking on it. Transitions enable us to control the speed and timing of the change, creating a smooth sense of motion.<\/p>\n\n\n\n<p>The syntax for transitions consists of:<\/p>\n\n\n\n<p><code>transition: [transition-property] [transition-duration] [transition-timing-function] [transition-delay];<\/code><\/p>\n\n\n\n<p>To break it down:<\/p>\n\n\n\n<ul>\n<li><code>[transition-property]<\/code> &#8211; selects the element property you wish to change<\/li>\n<\/ul>\n\n\n\n<ul>\n<li><code>[transition-duration]<\/code> &#8211; the duration of the change in seconds<\/li>\n<\/ul>\n\n\n\n<ul>\n<li><code>[transition-timing-function]<\/code> &#8211; how the transition is executed over time<\/li>\n<\/ul>\n\n\n\n<ul>\n<li><code>[transition-delay]<\/code> &#8211; an optional delay can be placed on the transition<\/li>\n<\/ul>\n\n\n\n<p>Here\u2019s an example of a transition applied to an element\u2019s background colour that changes over a 0.3 second period:<\/p>\n\n\n\n<p><code>transition-property: background-color;<\/code><\/p>\n\n\n\n<p><code>transition-duration: 0.3s;<\/code><\/p>\n\n\n\n<p><code>transition-timing-function: ease-in-out;<\/code><\/p>\n\n\n\n<p>That\u2019s all a bit wordy, but we can use shorthand to make our lives much easier:<\/p>\n\n\n\n<p><code>transition: background-color 0.3s ease-in-out;<\/code><\/p>\n\n\n\n<p>Many CSS properties are animatable with transitions. Here\u2019s a handy list of some of them as seen in Jennifer Niederst Robbins\u2019 book Learning Web Design:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/robbinstransproperties-3.png\" alt=\"\" class=\"wp-image-593\" width=\"162\" height=\"618\"\/><\/figure><\/div>\n\n\n<p>However, if we just want a quick, one-size-fits-all for all of our state changes on an element without targeting things like the background colour or width individually, we can use the rather nifty <code>all<\/code> value for <code>transition-property<\/code>. This targets all of the changes you make to the element.<\/p>\n\n\n\n<p><code>transition: all 0.3s ease-in-out;<\/code><\/p>\n\n\n\n<h2><strong>A closer look at the transition-timing-function<\/strong><\/h2>\n\n\n\n<p>The <code>transition-timing-function<\/code> dictates how the transition speeds up or slows down while it is being carried out. For example, the transition might begin slowly, then pick up the pace through to the end (otherwise known as <code>ease-in<\/code>). You might prefer it to ease slowly into the transition, speed up in the middle, then slow down towards the end (<code>ease-in-out<\/code>).<\/p>\n\n\n\n<p>The transition pace can be imagined as following a curve, where it flattens as the pace slows, and inclines as it speeds up. This is known as the <a href=\"https:\/\/cubic-bezier.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">cubic bezier<\/a>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/cubic-1024x763.png\" alt=\"\" class=\"wp-image-595\" width=\"433\" height=\"322\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/cubic-1024x763.png 1024w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/cubic-300x224.png 300w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/cubic-768x573.png 768w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/cubic-1200x895.png 1200w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/cubic.png 1360w\" sizes=\"(max-width: 433px) 100vw, 433px\" \/><\/figure><\/div>\n\n\n<h2><strong>An example of a simple transition<\/strong><\/h2>\n\n\n\n<p>In this little animation of a car driving along a road, perhaps we want to move that cloud slowly to the left when we hover over it, just to give an impression of some extra movement. We would need to perform a transform on it that translates it on its x axis.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/cloudhover1-1024x475.png\" alt=\"\" class=\"wp-image-596\" width=\"468\" height=\"216\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/cloudhover1-1024x475.png 1024w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/cloudhover1-300x139.png 300w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/cloudhover1-768x356.png 768w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/cloudhover1-1536x713.png 1536w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/cloudhover1-2048x950.png 2048w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/cloudhover1-1200x557.png 1200w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/cloudhover1-1980x919.png 1980w\" sizes=\"(max-width: 468px) 100vw, 468px\" \/><\/figure><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/cloudhovercode.png\" alt=\"\" class=\"wp-image-597\" width=\"480\" height=\"342\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/cloudhovercode.png 776w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/cloudhovercode-300x214.png 300w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/cloudhovercode-768x548.png 768w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><figcaption class=\"wp-element-caption\">Don\u2019t worry about all those strange -webkit prefixes just yet. We&#8217;ll get to them.<\/figcaption><\/figure><\/div>\n\n\n<p>Here we use the transition property to specify that the cloud should move horizontally by 1400px over a duration of 7 seconds. Using <code>ease-in-out<\/code>, the cloud starts off slowly when we hover over it, builds momentum as it moves to the left, then slows down towards the end of the transition. Note that the transition is applied to the cloud image itself, while the transform property belongs with the triggering event (in this case, <code>.clouds:hover<\/code>).<\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/zaraknox.co.uk\/coursework\/content-management\/css-animation\/\" target=\"_blank\">View this animation here.<\/a><\/p>\n\n\n\n<h2><strong>Browser support for transitions<\/strong><\/h2>\n\n\n\n<p>Luckily, CSS transitions are supported by most modern web browsers. That said, the level of support may vary depending on the version of the browser, and some older browsers may not support certain CSS animation features. As a general rule, we should not expect to encounter any issues with browser versions released after 2013. To check which browsers support transitions, you can refer to online resources such as <a href=\"https:\/\/caniuse.com\/\">CanIUse.com<\/a>, which gives comprehensive information on the support for various CSS features across different web browsers, including version numbers and any known issues or limitations.<\/p>\n\n\n\n<p>You might have spotted some vendor prefixes in our hovering cloud example code above. Just on the off-chance that someone views your site in an older browser, you can use vendor prefixes in your transitions to ensure that they will run. We can also let someone else do the hard work for us by heading to <a href=\"https:\/\/autoprefixer.github.io\/\">autoprefixer.github.io<\/a>, which parses our CSS and generates the vendor prefixes we need to include in our code.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/autoprefix-1024x150.png\" alt=\"\" class=\"wp-image-600\" width=\"574\" height=\"84\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/autoprefix-1024x150.png 1024w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/autoprefix-300x44.png 300w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/autoprefix-768x112.png 768w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/autoprefix-1536x225.png 1536w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/autoprefix-1200x176.png 1200w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/autoprefix.png 1694w\" sizes=\"(max-width: 574px) 100vw, 574px\" \/><figcaption class=\"wp-element-caption\">Autoprefixer can do all the heavy lifting for us.<\/figcaption><\/figure><\/div>\n\n\n<p>Here\u2019s an example of a transition that uses vendor prefixes to support older browsers. Each link icon has a <code>transform: scale()<\/code> on hover applied to it with a transition:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/navhover-1024x277.png\" alt=\"\" class=\"wp-image-603\" width=\"487\" height=\"132\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/navhover-1024x277.png 1024w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/navhover-300x81.png 300w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/navhover-768x208.png 768w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/navhover-1536x416.png 1536w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/navhover-1200x325.png 1200w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/navhover.png 1684w\" sizes=\"(max-width: 487px) 100vw, 487px\" \/><\/figure><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/linkhovercode.png\" alt=\"\" class=\"wp-image-604\" width=\"553\" height=\"324\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/linkhovercode.png 798w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/linkhovercode-300x176.png 300w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/linkhovercode-768x450.png 768w\" sizes=\"(max-width: 553px) 100vw, 553px\" \/><figcaption class=\"wp-element-caption\">These prefixes cover older versions of Safari, Firefox, and Opera respectively. Note that the \u2018plain\u2019 transition goes last in the cascade.<\/figcaption><\/figure><\/div>\n\n\n<p><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"776\" height=\"142\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/keyframes.png\" alt=\"\" class=\"wp-image-606\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/keyframes.png 776w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/keyframes-300x55.png 300w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/keyframes-768x141.png 768w\" sizes=\"(max-width: 776px) 100vw, 776px\" \/><\/figure><\/div>\n\n\n<p>Keyframes can be considered animation \u2018proper\u2019; they do not need to rely on a user interaction to execute, and can run a certain number of times or even infinitely if desired. Keyframes can dictate exactly how an element\u2019s state changes, and you can explicitly express not just the beginning and end points of the animation, but any part of it in between. Keyframes can be used in conjunction with transforms to produce a variety of effects.<\/p>\n\n\n\n<p>Once the keyframes have been defined, the animation property that references the keyframes can be applied directly to the element you would like to animate. It is easiest to think of the keyframes as an animation \u2018script\u2019 that can then be referenced where it is needed.<\/p>\n\n\n\n<p>The syntax for keyframe animations is made up of two parts:<\/p>\n\n\n\n<h2><strong>Part 1:<\/strong> <strong>Defining the keyframes<\/strong><\/h2>\n\n\n\n<p><code>@keyframes name-of-animation { <\/code><\/p>\n\n\n\n<p><code>0% { opacity: 0; } <\/code><\/p>\n\n\n\n<p><code>20% { opacity: 1; } <\/code><\/p>\n\n\n\n<p><code>80% { opacity: 0; } <\/code><\/p>\n\n\n\n<p><code>100% { opacity: 1; } <\/code><\/p>\n\n\n\n<p><code>}<\/code><\/p>\n\n\n\n<p>After naming our animation, we can define exactly what happens in the animation using percentages, with 0% denoting the start of the animation and 100% signifying the end. In this case, the element\u2019s opacity will change in intervals.<\/p>\n\n\n\n<p>We are not limited to percentages, however, and can simply use the <code>from<\/code> and <code>to<\/code> keywords to define the start and end of the animation, as we see in this animation named <code>whoosh<\/code> that uses <code>transform: translate()<\/code> to move an element to the left.<\/p>\n\n\n\n<p><code>@keyframes whoosh { <\/code><\/p>\n\n\n\n<p><code>from {transform: translateX(0) } <\/code><\/p>\n\n\n\n<p><code>to {transform: translateX(-400) } }<\/code><\/p>\n\n\n\n<h2><strong>Part 2:<\/strong> <strong>Calling the animation<\/strong><\/h2>\n\n\n\n<p><code>.animate-this-element { <\/code><\/p>\n\n\n\n<p><code>animation: name-of-animation 5s infinite; <\/code><\/p>\n\n\n\n<p><code>}<\/code><\/p>\n\n\n\n<p>The animation property is then used on the target element to call the defined keyframes and change the state of the element as desired. Above, shorthand has been used to reference the animation name, the animation\u2019s duration, and the number of times the animation will run. In full, the animation properties include:<\/p>\n\n\n\n<p>For efficiency, it is a good idea to use shorthand animation properties. They should also look rather familiar, as they are very similar to transition properties.<\/p>\n\n\n\n<ul>\n<li><code>animation-name<\/code> (required) &#8211; the name of the animation as specified in the keyframes<\/li>\n<\/ul>\n\n\n\n<ul>\n<li><code>animation-duration<\/code>(required) &#8211; usually given in seconds<\/li>\n<\/ul>\n\n\n\n<ul>\n<li><code>animation-timing-function<\/code> &#8211; options include <code>ease<\/code>, <code>ease-in<\/code>, <code>linear<\/code>, and all the timing-function values we have already encountered with transitions<\/li>\n<\/ul>\n\n\n\n<ul>\n<li><code>animation-iteration-count<\/code> &#8211; how many times the animation should repeat. This can be a number or set to <code>infinite<\/code><\/li>\n<\/ul>\n\n\n\n<ul>\n<li><code>animation-direction<\/code> &#8211; this defines whether the animation plays forward (<code>normal<\/code>), backwards (<code>reverse<\/code>), or back and forth (<code>alternate<\/code>). You can also start the animation from the end with <code>alternate-reverse<\/code>.<\/li>\n<\/ul>\n\n\n\n<h2><strong>A simple example of a keyframe animation<\/strong><\/h2>\n\n\n\n<p>Let\u2019s drive our car from earlier on.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/drive-1024x483.png\" alt=\"\" class=\"wp-image-610\" width=\"526\" height=\"247\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/drive-1024x483.png 1024w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/drive-300x142.png 300w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/drive-1536x725.png 1536w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/drive-2048x967.png 2048w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/drive-1200x566.png 1200w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/drive-1980x935.png 1980w\" sizes=\"(max-width: 526px) 100vw, 526px\" \/><\/figure><\/div>\n\n\n<p>We begin by defining our keyframes. The car is a PNG image that will move from the left to the right of the page by 1500px. We can use <code>from<\/code> and <code>to<\/code> to do this:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/drivekeyframes.png\" alt=\"\" class=\"wp-image-612\" width=\"502\" height=\"158\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/drivekeyframes.png 602w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/drivekeyframes-300x95.png 300w\" sizes=\"(max-width: 502px) 100vw, 502px\" \/><\/figure><\/div>\n\n\n<p>The animation is then called on the car element.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/driveanimation.png\" alt=\"\" class=\"wp-image-614\" width=\"555\" height=\"197\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/driveanimation.png 752w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/driveanimation-300x107.png 300w\" sizes=\"(max-width: 555px) 100vw, 555px\" \/><\/figure><\/div>\n\n\n<p>The animation will last for 5 seconds and run infinitely on a loop.<\/p>\n\n\n\n<h2><strong>Combining multiple transform properties with keyframe animations<\/strong><\/h2>\n\n\n\n<p>We can combine transforms to create more complex and dynamic effects. In the example below, a sense of movement and perspective is gained in our desert highway scene by combining scale and translate on elements. As they approach the \u2018camera\u2019 and get closer, their sizes increase.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/road-1024x488.png\" alt=\"\" class=\"wp-image-617\" width=\"525\" height=\"249\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/road-1024x488.png 1024w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/road-300x143.png 300w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/road-768x366.png 768w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/road-1536x732.png 1536w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/road-2048x975.png 2048w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/road-1200x572.png 1200w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/road-1980x943.png 1980w\" sizes=\"(max-width: 525px) 100vw, 525px\" \/><\/figure><\/div>\n\n\n<p>The white road marking is moved to the bottom of the page with <code>translateY<\/code>, and it is scaled up over time. This gives the impression of driving from a first-person perspective.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/roadkeyframes-1.png\" alt=\"\" class=\"wp-image-619\" width=\"540\" height=\"110\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/roadkeyframes-1.png 744w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/roadkeyframes-1-300x61.png 300w\" sizes=\"(max-width: 540px) 100vw, 540px\" \/><\/figure><\/div>\n\n\n<p>When we call the animation on our <code>.lines<\/code> element, we set it to run at a steady pace for 2 seconds with <code>linear<\/code> on an infinite loop.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/roadanimation.png\" alt=\"\" class=\"wp-image-622\" width=\"533\" height=\"243\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/roadanimation.png 910w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/roadanimation-300x137.png 300w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/roadanimation-768x351.png 768w\" sizes=\"(max-width: 533px) 100vw, 533px\" \/><\/figure><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/road2-1024x480.png\" alt=\"\" class=\"wp-image-624\" width=\"523\" height=\"244\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/road2-1024x480.png 1024w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/road2-300x141.png 300w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/road2-768x360.png 768w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/road2-1536x719.png 1536w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/road2-2048x959.png 2048w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/road2-1200x562.png 1200w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/road2-1980x927.png 1980w\" sizes=\"(max-width: 523px) 100vw, 523px\" \/><figcaption class=\"wp-element-caption\">Combining multiple transforms can produce a variety of effects.<\/figcaption><\/figure><\/div>\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/zaraknox.co.uk\/coursework\/content-management\/2nd-css-animation\/\" target=\"_blank\">View this animation page here.<\/a><\/p>\n\n\n\n<h2><strong>Working with SVG<\/strong><\/h2>\n\n\n\n<p>SVG elements (Scalable Vector Graphics) are an increasingly popular choice for adding movement to web pages, and can be used with CSS to make simple animations. They can also be animated with the XML language SMIL as well as JavaScript to create more complex animations. However, it would be wise to use SVG sparingly when animating due to poor browser support. Indeed, it is a good idea to consider fallback techniques.<\/p>\n\n\n\n<h2><strong>CSS fallback for SVG<\/strong><\/h2>\n\n\n\n<p>In our desert scene animation, the sun is a SVG sprite that changes colour when clicked and hovered upon, using a flipbook-like mechanic where three sun images are combined. However, if the user&#8217;s web browser does not support SVG, the animation will not work.<\/p>\n\n\n\n<div class=\"is-layout-flex wp-container-3 wp-block-columns\">\n<div class=\"is-layout-flow wp-block-column\"><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/sunsprite-02-1-341x1024.png\" alt=\"\" class=\"wp-image-632\" width=\"90\" height=\"269\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/sunsprite-02-1-341x1024.png 341w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/sunsprite-02-1-100x300.png 100w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/sunsprite-02-1-768x2304.png 768w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/sunsprite-02-1-512x1536.png 512w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/sunsprite-02-1-683x2048.png 683w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/sunsprite-02-1-1200x3600.png 1200w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/sunsprite-02-1.png 1280w\" sizes=\"(max-width: 90px) 100vw, 90px\" \/><\/figure><\/div><\/div>\n\n\n\n<div class=\"is-layout-flow wp-block-column is-vertically-aligned-center\"><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/spriteroad-3.png\" alt=\"\" class=\"wp-image-633\" width=\"451\" height=\"213\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/spriteroad-3.png 587w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/spriteroad-3-300x142.png 300w\" sizes=\"(max-width: 451px) 100vw, 451px\" \/><figcaption class=\"wp-element-caption\">The sprite changes position as the user interacts with it.<\/figcaption><\/figure><\/div><\/div>\n<\/div>\n\n\n\n<p>As a fallback, we have set a PNG of the sprite image just before the SVG version in the cascade. This way, the sun will still appear and work as expected, even if an older browser is being used.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/spritecode.png\" alt=\"\" class=\"wp-image-636\" width=\"495\" height=\"393\" srcset=\"https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/spritecode.png 940w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/spritecode-300x238.png 300w, https:\/\/zaraknox.co.uk\/journal\/wp-content\/uploads\/2023\/02\/spritecode-768x609.png 768w\" sizes=\"(max-width: 495px) 100vw, 495px\" \/><\/figure><\/div>\n\n\n<h2><strong>More on CSS Animation Fallbacks<\/strong><\/h2>\n\n\n\n<p>There are several types of CSS fallbacks that can be used for animations to ensure that the animation is still presentable and works as expected, even if the user&#8217;s browser doesn&#8217;t support the animation effect.<\/p>\n\n\n\n<p>Here are some common types of CSS fallbacks used for animations:<\/p>\n\n\n\n<ul>\n<li><em>Static fallbacks<\/em>: These are simple styles that are applied to the element if the animation is not supported. For example, if you have a CSS animation that rotates an element, you might apply a <code>transform: none<\/code> property to the element as a static fallback so that it still looks good and is positioned correctly even if the rotation effect is not supported.<\/li>\n<\/ul>\n\n\n\n<ul>\n<li><em>Feature detection<\/em>: One way to provide a fallback is to use feature detection to determine whether a particular CSS animation effect is supported by the user&#8217;s browser. If it is not, you can use a different animation effect or a static fallback instead. This approach requires some additional coding, but can help ensure that your website works as expected for all users.<\/li>\n<\/ul>\n\n\n\n<ul>\n<li><em>Progressive enhancement<\/em>: Another approach is to use progressive enhancement, where you start with a simple, static design that works for all users, and then add more complex animation effects using CSS and JavaScript for users with newer browsers that support these features.<\/li>\n<\/ul>\n\n\n\n<p>By using these types of fallbacks, you can ensure that your animations still look presentable and work as expected, even if some users are not able to see the full animation effect. This can help improve the accessibility and usability of your website for a wider range of users.<\/p>\n\n\n\n<h2><strong>Things to bear in mind when animating<\/strong><\/h2>\n\n\n\n<p>It&#8217;s important to remember that by providing fallbacks, you can ensure that your website is still usable and accessible for all users, regardless of their browser or device.<\/p>\n\n\n\n<p>Next, we may choose to (and probably should) make use of the<code> <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/@media\/prefers-reduced-motion\" data-type=\"URL\" data-id=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/@media\/prefers-reduced-motion\" target=\"_blank\" rel=\"noreferrer noopener\">prefers-reduced-motion<\/a><\/code> media query in our CSS to detect whether users have opted for reduced animation in their accessibility preferences. Many users suffer from motion disorders and other sensory conditions, and we need to account for them in our design.<\/p>\n\n\n\n<p>We should also consider how animation should be used, and how much is too much. After all, while a bit of polish and flair goes a long way, we do not want our website to become a <a href=\"https:\/\/www.youtube.com\/watch?v=HlX4T2SBkC0\" target=\"_blank\" rel=\"noreferrer noopener\">2002 Geocities page full of flashy graphics and whirling GIFs<\/a>.<\/p>\n\n\n\n<p>When used with consideration, animations can greatly enhance the user experience and bring some added delight to our web pages.<\/p>\n\n\n\n<h2><strong>References<\/strong><\/h2>\n\n\n\n<ol>\n<li>Seminar slides &#8211; <a href=\"https:\/\/zaraknox.co.uk\/coursework\/content-management\/slides.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/zaraknox.co.uk\/coursework\/content-management\/slides.pdf<\/a><\/li>\n\n\n\n<li>Chapter 18 of Learning Web Design by Jennifer Niederst Robbins: Transitions, Transforms, and Animation, 5th Edition 2018<\/li>\n\n\n\n<li>CSS animations &#8211; <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/animation\"><\/a><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/animation\">https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/animation<\/a><\/li>\n\n\n\n<li>CSS animations &#8211; <a href=\"https:\/\/css-tricks.com\/almanac\/properties\/a\/animation\/\"><\/a><a href=\"https:\/\/css-tricks.com\/almanac\/properties\/a\/animation\/\">https:\/\/css-tricks.com\/almanac\/properties\/a\/animation\/<\/a><\/li>\n\n\n\n<li>Transform, transition, keyframes and animation &#8211; <a href=\"https:\/\/www.youtube.com\/watch?v=jgw82b5Y2MU&amp;list=PL4cUxeGkcC9iGYgmEd2dm3zAKzyCGDtM5\"><\/a><a href=\"https:\/\/www.youtube.com\/watch?v=jgw82b5Y2MU&amp;list=PL4cUxeGkcC9iGYgmEd2dm3zAKzyCGDtM5\">https:\/\/www.youtube.com\/watch?v=jgw82b5Y2MU&amp;list=PL4cUxeGkcC9iGYgmEd2dm3zAKzyCGDtM5<\/a><\/li>\n\n\n\n<li>SVG Fallbacks &#8211; <a href=\"https:\/\/css-tricks.com\/a-complete-guide-to-svg-fallbacks\/\"><\/a><a href=\"https:\/\/css-tricks.com\/a-complete-guide-to-svg-fallbacks\/\">https:\/\/css-tricks.com\/a-complete-guide-to-svg-fallbacks\/<\/a><\/li>\n<\/ol>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is CSS animation? CSS animations are a way to add movement and interactivity to web pages using only CSS code, without the need for JavaScript or other programming languages. With CSS animations, we can create dynamic effects such as moving text and images, colour and font changes, and plenty of other visual touches. CSS [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[27],"tags":[35,7],"_links":{"self":[{"href":"https:\/\/zaraknox.co.uk\/journal\/wp-json\/wp\/v2\/posts\/575"}],"collection":[{"href":"https:\/\/zaraknox.co.uk\/journal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zaraknox.co.uk\/journal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zaraknox.co.uk\/journal\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zaraknox.co.uk\/journal\/wp-json\/wp\/v2\/comments?post=575"}],"version-history":[{"count":55,"href":"https:\/\/zaraknox.co.uk\/journal\/wp-json\/wp\/v2\/posts\/575\/revisions"}],"predecessor-version":[{"id":676,"href":"https:\/\/zaraknox.co.uk\/journal\/wp-json\/wp\/v2\/posts\/575\/revisions\/676"}],"wp:attachment":[{"href":"https:\/\/zaraknox.co.uk\/journal\/wp-json\/wp\/v2\/media?parent=575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zaraknox.co.uk\/journal\/wp-json\/wp\/v2\/categories?post=575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zaraknox.co.uk\/journal\/wp-json\/wp\/v2\/tags?post=575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}