{"id":56572,"date":"2022-08-07T03:01:27","date_gmt":"2022-08-06T17:01:27","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=56572"},"modified":"2022-08-07T09:14:39","modified_gmt":"2022-08-06T23:14:39","slug":"css-grid-column-animation-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/css-grid-column-animation-tutorial\/","title":{"rendered":"CSS Grid Column Animation Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/div_grid_rearrange.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"CSS Row Gap Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/div_grid_rearrange_animations.jpg\" title=\"CSS Row Gap Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">CSS Grid Column Animation Tutorial<\/p><\/div>\n<p>CSS <a target=_blank title='CSS @keyframes rule information from W3schools' href='https:\/\/www.w3schools.com\/cssref\/css3_pr_animation-keyframes.asp'>@keyframes rule<\/a> animations can add &#8220;pizazz&#8221; to your webpages.  And, because yesterday&#8217;s <a title='CSS Grid Column Primer Tutorial' href='#cssgcpt'>CSS Grid Column Primer Tutorial<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/div_grid_rearrange.html\">web application<\/a>&#8216;s actions could take place in the blink of an eye before registering &#8220;what just happened&#8221; for the user, we offer optional &#8220;pizazz&#8221; as of today.  It&#8217;s amazing what CSS properties you can animate, and you can do more than one property at a time doing it!  Using a second property can help clarify an explanation, as we think we are improving with the <font color=blue>animation related Javascript function logic<\/font> below &#8230;<\/p>\n<p><code><br \/>\nfunction myFunction() {<br \/>\n  <font color=blue>if (document.getElementById('cbanima').checked) {<br \/>\n     mmcnt++;<br \/>\n     if (('' + document.getElementById(\"myDIV\" + one).style.gridColumn) == '') {<br \/>\n     document.getElementById('anima').innerHTML+='&lt;style&gt;  #' + \"myDIV\" + one + ' {  animation: mymove' + mmcnt + ' 2s 2; } @keyframes mymove' + mmcnt + ' { from {grid-column: ' + was[eval('' + one)] + '; background-color: rgba(255, 255, 255, 0.2);} to {grid-column: ' + rto + '; background-color: rgba(255, 255, 255, 0.8);} } &lt;\/style&gt;';<br \/>\n     } else {<br \/>\n     document.getElementById('anima').innerHTML+='&lt;style&gt;  #' + \"myDIV\" + one + ' {  animation: mymove' + mmcnt + ' 2s 2; } @keyframes mymove' + mmcnt + ' { from {grid-column: ' + ('' + document.getElementById(\"myDIV\" + one).style.gridColumn) + '; background-color: rgba(255, 255, 255, 0.2);} to {grid-column: ' + rto + '; background-color: rgba(255, 255, 255, 0.8);} } &lt;\/style&gt;';<br \/>\n     }<br \/>\n     setTimeout(postonl, 2200);<br \/>\n  } else {<\/font><br \/>\n  document.getElementById(\"myDIV\" + one).style.gridColumn = rto;<br \/>\n  if (document.getElementById(\"mysel\").innerHTML == '') {<br \/>\n    document.getElementById(\"mysel\").innerHTML+='&lt;option value=\"\"&gt;Please review and\/or replay movements&lt;\/option&gt;';<br \/>\n  }<br \/>\n  document.getElementById(\"mysel\").innerHTML+='&lt;option value=\"' + one + ':' + rto + '\"&gt;' + document.getElementById(\"mybut\").innerHTML + '&lt;\/option&gt;';<br \/>\n  onl();<br \/>\n  <font color=blue>}<\/font><br \/>\n}<br \/>\n<\/code><\/p>\n<p> &#8230; applying &#8220;on the fly&#8221; dynamic CSS styling to <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/div_grid_rearrange.html-GETME\" title=\"div_grid_rearrange.html\">our changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/div_grid_rearrange.html-GETME\" title=\"div_grid_rearrange.html\">div_grid_rearrange.html<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/div_grid_rearrange.html\">&#8220;proof of concept&#8221; CSS grid-column<\/a> tester <a href='#myifgp' title='Try below'>below<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/css-grid-column-animation-tutorial\/'>CSS Grid Column Animation Tutorial<\/a>.<\/p-->\n<hr>\n<p id='cssgcpt'>Previous relevant <a target=_blank title='CSS Grid Column Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/css-grid-column-primer-tutorial\/'>CSS Grid Column 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\/div_grid_rearrange.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"CSS Row Gap Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/div_grid_rearrange.jpg\" title=\"CSS Row Gap Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">CSS Grid Column Primer Tutorial<\/p><\/div>\n<p>Continuing on with the theme of &#8220;HTML div element looking like an HTML table element&#8221; regarding a &#8220;grid look&#8221;, onto yesterday&#8217;s <a title='CSS Row Gap Primer Tutorial' href='#cssrgpt'>CSS Row Gap Primer Tutorial<\/a> start, today we turn our attention to the CSS <a target=_blank title='CSS grid-column property information from W3schools' href='https:\/\/www.w3schools.com\/cssref\/pr_grid-column.asp'>&#8220;grid-column&#8221; property<\/a> &#8230;<\/p>\n<blockquote cite='\/\/www.w3schools.com\/cssref\/pr_grid-column.asp'><p>\nThe grid-column property specifies a grid item&#8217;s size and location in a grid layout, and is a shorthand property for the following properties:<br \/>\n<br \/>\ngrid-column-start<br \/>\ngrid-column-end\n<\/p><\/blockquote>\n<p>Why the interest?  Well, we&#8217;d reference <a target=_blank title='CSS Row Gap Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/css-row-gap-primer-tutorial\/'>yesterday&#8217;s tutorial<\/a> here &#8230;<\/p>\n<blockquote cite='\/\/www.rjmprogramming.com.au\/ITblog\/css-row-gap-primer-tutorial\/'>\n<p>And yes, HTML div is more favoured than HTML table regarding <a target=_blank title='Responsive design' href='https:\/\/www.w3schools.com\/html\/html_responsive.asp'>responsive design<\/a>.<\/p>\n<\/blockquote>\n<p> &#8230; as an &#8220;interest point&#8221;, at least for us.  In &#8220;table talk&#8221; these are a bit like <a target=_blank title='Table td cell rowspan and colspan information from W3schools' href='https:\/\/www.w3schools.com\/html\/html_table_colspan_rowspan.asp'>&#8220;colspan&#8221; and &#8220;rowspan&#8221;<\/a>.<\/p>\n<p>In assembling today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/div_grid_rearrange.html_GETME\" title=\"div_grid_rearrange.html\">&#8220;proof of concept&#8221; css_row_gap_usage.html<\/a> HTML\/CSS parts of the design, we add a little Javascript to with the <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/div_grid_rearrange.html\" title=\"Click picture\">web application<\/a> we thank <a target=_blank title='Tryit Editor v3.7 regarding CSS grid-column' href='https:\/\/www.w3schools.com\/cssref\/tryit.asp?filename=trycss_grid-column'>as a major code source of inspiration<\/a>, thanks.<\/p>\n<p>Want to see what we mean?<\/p>\n<p><iframe id=myifgp src='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/div_grid_rearrange.html' style='width:100%;height:905px;'><\/iframe><\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/css-row-gap-primer-tutorial\/'>CSS Row Gap Primer Tutorial<\/a>.<\/p-->\n<hr>\n<p id='cssrgpt'>Previous relevant <a target=_blank title='CSS Row Gap Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/css-row-gap-primer-tutorial\/'>CSS Row Gap 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\/css_row_gap_usage.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"CSS Row Gap Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/css_row_gap_usage.jpg\" title=\"CSS Row Gap Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">CSS Row Gap Primer Tutorial<\/p><\/div>\n<p>Yes, an HTML div element innerHTML content can be organized like an HTML table in a &#8220;grid&#8221; like way via CSS like &#8230;<\/p>\n<p><code><br \/>\n&lt;style&gt;<br \/>\ndiv.grid-container {<br \/>\n  display: grid;<br \/>\n  row-gap: 50px;<br \/>\n}<br \/>\n&lt;\/style&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; thanks to <a target=_blank title='https:\/\/www.w3schools.com\/cssref\/tryit.asp?filename=trycss3_row-gap' href='\/\/www.w3schools.com\/cssref\/tryit.asp?filename=trycss3_row-gap'>https:\/\/www.w3schools.com\/cssref\/tryit.asp?filename=trycss3_row-gap<\/a> here, too!<\/p>\n<p>And yes, HTML div is more favoured than HTML table regarding <a target=_blank title='Responsive design' href='https:\/\/www.w3schools.com\/html\/html_responsive.asp'>responsive design<\/a>.<\/p>\n<p>And so, yes, we thought you might be interested in our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/css_row_gap_usage.html_GETME\">proof of concept css_row_gap_usage.html<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/css_row_gap_usage.html\" title=\"Click picture\">web application<\/a> trying to fit some <font size=1>sub<\/font>div into <a target=_blank title='window.innerHeight vs ...' href='https:\/\/www.google.com\/search?q=innerheight+vs+outerheight&#038;rlz=1C5CHFA_enAU973AU973&#038;oq=innerHeight&#038;aqs=chrome.0.69i59j69i57j0i512l2j0i20i263i512j0i512l5.3273j0j4&#038;sourceid=chrome&#038;ie=UTF-8'>window.innerHeight<\/a> &#8220;real estate&#8221;.<\/p>\n<p>And &#8230;<\/p>\n<blockquote cite='https:\/\/www.youtube.com\/watch?v=iRlqmTKyQx0'><p>\n<a target=_blank title='No No No No N No Yes!' href='https:\/\/www.youtube.com\/watch?v=iRlqmTKyQx0'>No No No No N No Yes!<\/a>\n<\/p><\/blockquote>\n<p> &#8230; we think you could also try this out for yourself, below &#8230;<\/p>\n<p><iframe src='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/css_row_gap_usage.html' style='width:100%;height:905px;'><\/iframe><\/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='#d56552' onclick='var dv=document.getElementById(\"d56552\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/div\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d56552' 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='#d56564' onclick='var dv=document.getElementById(\"d56564\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/column\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d56564' 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='#d56572' onclick='var dv=document.getElementById(\"d56572\"); 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='d56572' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>CSS @keyframes rule animations can add &#8220;pizazz&#8221; to your webpages. And, because yesterday&#8217;s CSS Grid Column Primer Tutorial&#8216;s web application&#8216;s actions could take place in the blink of an eye before registering &#8220;what just happened&#8221; for the user, we offer &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/css-grid-column-animation-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":[4,12,14,37],"tags":[84,2388,230,281,342,4053,576,675,997,2232,2644,1991,1075,2389,1209,1212,1238,1319],"class_list":["post-56572","post","type-post","status-publish","format-standard","hentry","category-animation","category-elearning","category-event-driven-programming","category-tutorials","tag-animation-2","tag-colspan","tag-column","tag-css","tag-div","tag-grid-column","tag-html","tag-keyframes","tag-programming","tag-property","tag-responsive","tag-responsive-design","tag-row","tag-rowspan","tag-style","tag-styling","tag-table","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/56572"}],"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=56572"}],"version-history":[{"count":3,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/56572\/revisions"}],"predecessor-version":[{"id":56577,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/56572\/revisions\/56577"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=56572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=56572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=56572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}