		{"id":29178,"date":"2017-02-10T21:01:56","date_gmt":"2017-02-10T13:01:56","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=29178"},"modified":"2022-08-24T16:55:09","modified_gmt":"2022-08-24T08:55:09","slug":"shiftcss","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/shiftcss\/","title":{"rendered":"Create Fully Animated Widgets with Shift.css"},"content":{"rendered":"<p><strong>Note:<\/strong> Shift.css is now unavailable.<\/p>\n<p><strong>Web animation<\/strong> offers a way to <strong>grab people\u2019s attention<\/strong> and <strong>draw them further<\/strong> into a website. There are lots of tools out there to <strong>create free animations<\/strong> but <strong>Shift.css<\/strong> is one of the newest in the bunch.<\/p>\n<p>It\u2019s a <strong>free open source framework<\/strong> made for creating <strong>dynamic animations within any container<\/strong>. And these animations <strong>aren\u2019t locked into one sequence<\/strong>. You can actually build custom animations for <strong>each element<\/strong> in the block and apply these <strong>in a certain order<\/strong>.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/shiftcss\/01-shiftcss-homepage.jpg\" alt=\"shift.css homepage\" width=\"1000\" height=\"497\"><\/figure>\n<p>The <strong><shift demo page> can show you much better than I can explain in words.<\/shift><\/strong><\/p>\n<p>One thing you\u2019ll notice is that each element inside the container is <strong>a separate HTML element<\/strong>. Whether it\u2019s an SVG or an image or whatever, you can animate everything separately to <strong>create your own custom animation effect<\/strong>.<\/p>\n<p>The library comes with two files, a <code>.css<\/code> and <code>.js<\/code> library, and both need to be <strong>added to your document head<\/strong>.<\/p>\n<p>I can\u2019t find any GitHub repo for this project, so you\u2019ll need to <strong>download the files directly<\/strong> from the Shift.css website.<\/p>\n<p>The next step is to <strong>define a container element<\/strong> with some contents. Class names are important, so every animating element needs to <strong>have the class <code>.shift-element<\/code> applied<\/strong>.<\/p>\n<pre>\r\n&lt;div id=\"shift-container\"&gt;\r\n  &lt;div id=\"div1\" class=\"shift-element\"&gt;\r\n    &lt;div id=\"div2\" class=\"shift-element\"&gt;&lt;\/div&gt;\r\n    &lt;div id=\"div3\" class=\"shift-element\"&gt;&lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;<\/pre>\n<p>Along with these classes, you can also <strong>add HTML5 data attributes<\/strong> to define how the animation works. Right now, there are only three, but they should be enough to customize a full animation effect.<\/p>\n<ol>\n<li><strong>data-animation<\/strong>: Name of the animation<\/li>\n<li><strong>data-delay<\/strong>: Total delay(in seconds) before the animation starts<\/li>\n<li><strong>data-duration<\/strong>: Total length(in seconds) of the animation<\/li>\n<\/ol>\n<p>The animation name needs to be a <strong>predefined animation<\/strong> created for the Shift library. Right now there are <strong>15 animation names to choose from<\/strong>. You can see them listed at the bottom of the Shift.css homepage.<\/p>\n<p>Just <strong>copy\/paste<\/strong> whatever you want <strong>into the animation name setting<\/strong> and you should be good to go! For example, if I wanted to use the exit fade animation, I\u2019d add <code>data-animation=\"shift_exitFade\"<\/code> as a data attribute to whatever element should animate that way. Easy peasy.<\/p>\n<p>I do wish this library came with more options in JavaScript because it would let developers have so much more control over the placement and features. But for a simple(and free) animation framework, I can\u2019t complain.<\/p>\n<p>Shift.CSS is perfect for <strong>newer developers<\/strong> who want to create <strong>more complex animation styles<\/strong> without writing verbose code from scratch.<\/p>\n<p class=\"recommended_top\">\n\t\t\t\t\t<strong>Read Also:<\/strong>\u00a0\n\t\t\t\t\t<a target=\"_blank\" href=\"https:\/\/www.hongkiat.com\/blog\/tuesday-css\/\">Tuesday.css is The Hottest Animation Library Right Now<\/a>\n\t\t\t\t<\/p>","protected":false},"excerpt":{"rendered":"<p>Note: Shift.css is now unavailable. Web animation offers a way to grab people\u2019s attention and draw them further into a website. There are lots of tools out there to create free animations but Shift.css is one of the newest in the bunch. It\u2019s a free open source framework made for creating dynamic animations within any&hellip;<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3393],"tags":[507,4109],"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.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Create Fully Animated Widgets with Shift.css - Hongkiat<\/title>\n<meta name=\"description\" content=\"Note: Shift.css is now unavailable. Web animation offers a way to grab people&#039;s attention and draw them further into a website. There are lots of tools\" \/>\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\/shiftcss\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create Fully Animated Widgets with Shift.css\" \/>\n<meta property=\"og:description\" content=\"Note: Shift.css is now unavailable. Web animation offers a way to grab people&#039;s attention and draw them further into a website. There are lots of tools\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/shiftcss\/\" \/>\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=\"2017-02-10T13:01:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-24T08:55:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/shiftcss\/01-shiftcss-homepage.jpg\" \/>\n<meta name=\"author\" content=\"Jake Rocheleau\" \/>\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=\"Jake Rocheleau\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/shiftcss\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/shiftcss\\\/\"},\"author\":{\"name\":\"Jake Rocheleau\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/966b2daea15283b4145e71aa98a82c2a\"},\"headline\":\"Create Fully Animated Widgets with Shift.css\",\"datePublished\":\"2017-02-10T13:01:56+00:00\",\"dateModified\":\"2022-08-24T08:55:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/shiftcss\\\/\"},\"wordCount\":97,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/shiftcss\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/shiftcss\\\/01-shiftcss-homepage.jpg\",\"keywords\":[\"CSS\",\"CSS Frameworks\"],\"articleSection\":[\"Toolkit\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/shiftcss\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/shiftcss\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/shiftcss\\\/\",\"name\":\"Create Fully Animated Widgets with Shift.css - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/shiftcss\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/shiftcss\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/shiftcss\\\/01-shiftcss-homepage.jpg\",\"datePublished\":\"2017-02-10T13:01:56+00:00\",\"dateModified\":\"2022-08-24T08:55:09+00:00\",\"description\":\"Note: Shift.css is now unavailable. Web animation offers a way to grab people's attention and draw them further into a website. There are lots of tools\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/shiftcss\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/shiftcss\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/shiftcss\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/shiftcss\\\/01-shiftcss-homepage.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/shiftcss\\\/01-shiftcss-homepage.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/shiftcss\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Fully Animated Widgets with Shift.css\"}]},{\"@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\\\/966b2daea15283b4145e71aa98a82c2a\",\"name\":\"Jake Rocheleau\",\"description\":\"Jake is a writer and designer with over 10 years experience working on the web. He writes about user experience design and cool resources for designers\",\"sameAs\":[\"https:\\\/\\\/www.hongkiat.com\"],\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/jake\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Create Fully Animated Widgets with Shift.css - Hongkiat","description":"Note: Shift.css is now unavailable. Web animation offers a way to grab people's attention and draw them further into a website. There are lots of tools","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\/shiftcss\/","og_locale":"en_US","og_type":"article","og_title":"Create Fully Animated Widgets with Shift.css","og_description":"Note: Shift.css is now unavailable. Web animation offers a way to grab people's attention and draw them further into a website. There are lots of tools","og_url":"https:\/\/www.hongkiat.com\/blog\/shiftcss\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2017-02-10T13:01:56+00:00","article_modified_time":"2022-08-24T08:55:09+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/shiftcss\/01-shiftcss-homepage.jpg","type":"","width":"","height":""}],"author":"Jake Rocheleau","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Jake Rocheleau","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/shiftcss\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/shiftcss\/"},"author":{"name":"Jake Rocheleau","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/966b2daea15283b4145e71aa98a82c2a"},"headline":"Create Fully Animated Widgets with Shift.css","datePublished":"2017-02-10T13:01:56+00:00","dateModified":"2022-08-24T08:55:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/shiftcss\/"},"wordCount":97,"commentCount":0,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/shiftcss\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/shiftcss\/01-shiftcss-homepage.jpg","keywords":["CSS","CSS Frameworks"],"articleSection":["Toolkit"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/shiftcss\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/shiftcss\/","url":"https:\/\/www.hongkiat.com\/blog\/shiftcss\/","name":"Create Fully Animated Widgets with Shift.css - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/shiftcss\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/shiftcss\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/shiftcss\/01-shiftcss-homepage.jpg","datePublished":"2017-02-10T13:01:56+00:00","dateModified":"2022-08-24T08:55:09+00:00","description":"Note: Shift.css is now unavailable. Web animation offers a way to grab people's attention and draw them further into a website. There are lots of tools","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/shiftcss\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/shiftcss\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/shiftcss\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/shiftcss\/01-shiftcss-homepage.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/shiftcss\/01-shiftcss-homepage.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/shiftcss\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create Fully Animated Widgets with Shift.css"}]},{"@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\/966b2daea15283b4145e71aa98a82c2a","name":"Jake Rocheleau","description":"Jake is a writer and designer with over 10 years experience working on the web. He writes about user experience design and cool resources for designers","sameAs":["https:\/\/www.hongkiat.com"],"url":"https:\/\/www.hongkiat.com\/blog\/author\/jake\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/s4uxU-shiftcss","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/29178","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\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=29178"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/29178\/revisions"}],"predecessor-version":[{"id":61934,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/29178\/revisions\/61934"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=29178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=29178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=29178"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=29178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}