{"id":33885,"date":"2017-10-23T03:01:53","date_gmt":"2017-10-22T17:01:53","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=33885"},"modified":"2017-10-22T12:04:12","modified_gmt":"2017-10-22T02:04:12","slug":"css3-animations-below-the-fold-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/css3-animations-below-the-fold-tutorial\/","title":{"rendered":"CSS3 Animations Below the Fold Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/keyframes\/css3_animation_belowthefold.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"CSS3 Animations Below the Fold Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/keyframes\/css3_animation_belowthefold.jpg\" title=\"CSS3 AnimationsBelow the Fold Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">CSS3 Animations Below the Fold Tutorial<\/p><\/div>\n<p>There is a general term <a target=_blank title='Below the fold wiktionary definition, thanks' href='https:\/\/en.wiktionary.org\/wiki\/below_the_fold'>&#8220;Below the Fold&#8221;<\/a> that says, as far as web design goes &#8230;<\/p>\n<blockquote cite='https:\/\/en.wiktionary.org\/wiki\/below_the_fold'><p>\nFar enough down that it is not likely to be visible in the initial display of a standard browser window, such that the reader will probably have to scroll down before seeing it.\n<\/p><\/blockquote>\n<p>Well, as you might surmise, we are coming from a hardcopy world into the new &#8220;softcopy&#8221; digital world, and this &#8220;below the fold&#8221; initially referred to the writing below the &#8220;fold&#8221; of a folded newspaper, moving into our modern world not only to cover the webpage bits below the bottom of your screen.  It can cover all webpage goings on off-screen.<\/p>\n<p>If you are like me, you might have to grow up, and like me, accept that it is okay to allow for (perhaps huge) negative CSS style property <a target=_blank title=\"CSS margin-left idea information from w3schools ... thanks\" href=\"http:\/\/www.w3schools.com\/cssref\/pr_margin-left.asp\"><i>margin-left<\/i><\/a> or (perhaps hugely) positive <a target=_blank title=\"CSS margin-top idea information from w3schools ... thanks\" href=\"http:\/\/www.w3schools.com\/cssref\/pr_margin-top.asp\"><i>margin-top<\/i><\/a> that would, respectively, place your data off to the left of the visible screen or (truly) &#8220;below the fold&#8221;, either way, another <a target=_blank title='Reveal blog postings at this blog' href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/reveal\">&#8220;reveal&#8221;<\/a> type tool in your armoury.  Still too much like me?!  If so, let me get you thinking by this analogy.  When you go to the theatre and you are watching, say, a musical, and the cast amazes you by their costumes in one scene, and then minutes later while you are distracted by a shorter inconsequential scene, that main cast comes back again dressed totally differently, and amazing you again.  Well, that costume change, off-screen, is what we might be able to harness using &#8220;below the fold&#8221; thinking.<\/p>\n<p>And so today represents our slow &#8220;lateral thinking&#8221; acceptance of ideas in this line of thinking.  We&#8217;re going to start with today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/keyframes\/css3_animation_belowthefold.html\" title=\"Click picture\">live run<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/keyframes\/css3_animation_belowthefold.html_GETME\" title=\"css3_animation_belowthefold.html\">css3_animation_belowthefold.html<\/a> pretty simple HTML and CSS (and tiny bits of Javascript (DOM)) code, inspired by <a target=_blank title='https:\/\/codepen.io\/tonygentilcore\/pen\/pHmdJ' href='https:\/\/codepen.io\/tonygentilcore\/pen\/pHmdJ'>this &#8220;framework&#8221; to the idea<\/a>, thanks, of starting with a CSS3 Animation initially positioned (truly) &#8220;below the fold&#8221;, and then the user is invited to click or touch amongst the &#8220;introductory blurb&#8221; we present to bring that CSS3 Animation <i>out of hiding<\/i> and into view.  Like yesterday&#8217;s <a title='CSS3 Animations with Javascript DOM Primer Tutorial' href='#css3ajdompt'>CSS3 Animations with Javascript DOM Primer Tutorial<\/a> we offer the changing of the CSS3 Animation&#8217;s look a bit too, though the main &#8220;creeping up on knowledge&#8221; lesson today is that you can be doing things <i>off-screen<\/i> while a different set of things is going on <i>on-screen<\/i>.  Cute, huh?!  This can be augmented with some of the asynchronous ideas in HTML and Javascript too, and we&#8217;ll be doing a <a target=_blank title='?' href=\"https:\/\/www.youtube.com\/watch?v=Ci_FOZyTPug\">&#8220;Fu Manchu&#8221;<\/a> regarding all this.<\/p>\n<hr>\n<p id='css3ajdompt'>Previous relevant <a target=_blank title='CSS3 Animations with Javascript DOM Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/css3-animations-with-javascript-dom-primer-tutorial\/'>CSS3 Animations with Javascript DOM Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/keyframes\/keyframes_test.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"CSS3 Animations with Javascript DOM Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/keyframes\/keyframes_test_more.jpg\" title=\"CSS3 Animations with Javascript DOM Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">CSS3 Animations with Javascript DOM Primer Tutorial<\/p><\/div>\n<p>We&#8217;re extending some ideas first played with <a title='CSS3 @keyframes Rule Primer Tutorial' href='#css3@rpt'>CSS3 @keyframes Rule Primer Tutorial<\/a> regarding CSS3 Animations, an important topic.  Now in that previous work we never used Javascript, and today, we don&#8217;t clobber that version, because that is an important consideration here.  CSS3 Animations can speed up your webpages by doing away with so much Javascript load inefficiency, at its best.  But today, we introduce Javascript DOM logic in order to start you thinking about the flexibility of these @keyframes CSS3 Animation rules, adding today thoughts regarding dynamic arrangements for &#8230;<\/p>\n<ul>\n<li>animation duration<\/li>\n<li>animation delay<\/i>\n<li>colour<\/li>\n<li>background image<\/li>\n<\/ul>\n<p>So maybe you want to compare the old and the new below &#8230;<\/p>\n<table border=20 style=width:100%;>\n<tbody>\n<tr>\n<th>Old <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/keyframes\/keyframes_test.html\" title='Old way'>CSS3 Animation<\/a><br \/><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/keyframes\/keyframes_test.html_GETME\" title='keyframes_test.html'>keyframes_test.html<\/a><\/th>\n<th>New <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/keyframes\/keyframes_test.htm\" title='Click picture'>CSS3 Animation<\/a><br \/><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/keyframes\/keyframes_test.html-GETME\" title='keyframes_test.htm'>keyframes_test.htm<\/a> (changed <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/keyframes\/keyframes_test.html-GETME\" title='keyframes_test.htm'>this way<\/a>)<\/th>\n<\/tr>\n<tr>\n<td><iframe style=\"width:100%;height:800px;\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/keyframes\/keyframes_test.html\" title='Old CSS3 Animations'><\/iframe><\/td>\n<td><iframe style=\"width:100%;height:800px;\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/keyframes\/keyframes_test.htm\" title='New CSS3 Animations'><\/iframe><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr>\n<p id='css3@rpt'>Previous relevant <a target=_blank title='CSS3 @keyframes Rule Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/css3-@keyframes-rule-primer-tutorial\/'>CSS3 @keyframes Rule Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/keyframes\/CSS3_keyframes.m4v\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"CSS3 @keyframes Rule Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/keyframes\/CSS3_keyframes.jpg\" title=\"CSS3 @keyframes Rule Primer Tutorial\" \/><\/a><p class=\"wp-caption-text\">CSS3 @keyframes Rule Primer Tutorial<\/p><\/div>\n<p>Here is a tutorial that introduces you to the idea that you can use CSS (CSS3) to perform animation tasks.  One such idea is to use CSS3 @keyframes Rules on web browsers (for Internet Explorer you would need Internet Explorer 10 or above).<\/p>\n<p>As mentioned in the tutorial <a target=_blank title='WordPress CSS Change helped by Firebug Primer Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5873'>WordPress CSS Change helped by Firebug Primer Tutorial<\/a> CSS works with static scenarios where you can define everything ahead of time, with no new dynamic resources, but the effect of animation can make it seem that dynamic things are going on, and can add great interest to your websites.   You could try your animations right in front (the distance being inversely proportional to your regard for your regal beast<i>ing<\/i>) of your cat (no cat &#8230; try origami &#8230; but the results are unpredictable).<\/p>\n<p>Useful tutorials for the contents here (thanks) were:<\/p>\n<ul>\n<li><a target=_blank title='CSS3 @keyframes Rule' href='http:\/\/www.w3schools.com\/cssref\/css3_pr_animation-keyframes.asp'>CSS3 @keyframes Rule<\/a><\/li>\n<li><a target=_blank title='CSS Transparency Settings for All Browsers' href='http:\/\/css-tricks.com\/css-transparency-settings-for-all-broswers\/'>CSS Transparency Settings for All Browsers<\/a><\/li>\n<li><a target=_blank title='CSS Colour Gradient' href='http:\/\/stackoverflow.com\/questions\/17043479\/css-color-gradient'>CSS Colour Gradient<\/a><\/li>\n<li><a target=_blank title='Web colours' href='http:\/\/en.wikipedia.org\/wiki\/Web_colors'>Web colours<\/a><\/li>\n<\/ul>\n<p>Here is a link to some downloadable HTML programming source code which you may want to rename to <a target=_blank title='keyframes_test.html' href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/keyframes\/keyframes_test.html_GETME\">keyframes_test.html<\/a><\/p>\n<p>And here is a <a target=_blank title='keyframes_test.html' href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/keyframes\/keyframes_test.html\">live run<\/a>.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d5896' onclick='var dv=document.getElementById(\"d5896\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=CSS\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d5896' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d33863' onclick='var dv=document.getElementById(\"d33863\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/animation\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d33863' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d33885' onclick='var dv=document.getElementById(\"d33885\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/fold\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d33885' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>There is a general term &#8220;Below the Fold&#8221; that says, as far as web design goes &#8230; Far enough down that it is not likely to be visible in the initial display of a standard browser window, such that the &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/css3-animations-below-the-fold-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,37],"tags":[84,126,127,281,282,354,449,576,652,675,1943,2371,997,1063,2254,1319,1407],"class_list":["post-33885","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-animation-2","tag-background","tag-background-image","tag-css","tag-css3","tag-dom","tag-fold","tag-html","tag-javascript","tag-keyframes","tag-margin-left","tag-margin-top","tag-programming","tag-reveal","tag-rules","tag-tutorial","tag-web-design"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/33885"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=33885"}],"version-history":[{"count":11,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/33885\/revisions"}],"predecessor-version":[{"id":33896,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/33885\/revisions\/33896"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=33885"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=33885"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=33885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}