{"id":24927,"date":"2016-09-14T03:01:43","date_gmt":"2016-09-13T17:01:43","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=24927"},"modified":"2016-09-14T09:54:52","modified_gmt":"2016-09-13T23:54:52","slug":"star-proteins-versus-superbugs-game-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/star-proteins-versus-superbugs-game-primer-tutorial\/","title":{"rendered":"Star Proteins versus Superbugs Game Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Reveal\/star_proteins_vs_superbugs.html\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Star Proteins versus Superbugs Game Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/spvs.jpg\" title=\"Star Proteins versus Superbugs Game Primer Tutorial\" \/><\/a><p class=\"wp-caption-text\">Star Proteins versus Superbugs Game Primer Tutorial<\/p><\/div>\n<p>Never got into the Space Invaders video game as a kid, but somehow got all aggressive towards &#8220;Superbugs&#8221; after reading the inspiring story of <a target=_blank title='Brilliance of Shu Lam' href='http:\/\/www.smh.com.au\/technology\/sci-tech\/beyond-antibiotics-starshaped-protein-kills-feared-superbugs-20160912-grehpx.html'>Shu Lam&#8217;s revolutionary work<\/a> with Star shaped proteins breaking down the Walls of protection that Superbugs develop if we are unlucky enough to catch them.  Then thought back, as any graphically challenged programmer does to the first thoughts about feasibility &#8230; is there anything already done to ease the pain of imagery required for our proposed game?  And then remembered back to the &#8230;<\/p>\n<ul>\n<li>stars of <a title='HTML\/Javascript Reveal Image In Front of Image Tutorial' href='#hjrifoit'>HTML\/Javascript Reveal Image In Front of Image Tutorial<\/a> as shown below &#8230; and then thought &#8220;how hard can it be to divvy up<\/li>\n<li>bricks &#8230; because they can just gather as HTML img elements (all of the one brick image, repeated) higgledy piggledy (with bits of &amp;nbsp; to offset the mortar, as any bricklayer worth his salt will tell you &#8230; unless he wants a laugh at the end of you laying?!)&#8221; in an HTML td &#8220;cell&#8221; element in the middle, to the right of our &#8220;stars&#8221; and to the left of our<\/li>\n<li>superbugs &#8230; ah, bit of a slowdown here &#8230; but looking up Google Image &#8220;type=Clipart&#8221; search for &#8220;bug&#8221; led us to this <a target=_blank title='Clipart website' href='http:\/\/www.clipartkid.com'>very helpful website<\/a> &#8230; thanks &#8230; and the old &#8220;S&#8221; like for Superman &#8230; doh?! &#8230; got us the media for the job\/game<\/li>\n<\/ul>\n<p>The &#8220;shoot &#8217;em up&#8221; aspects are, as you&#8217;d expect from a properly spent youth not playing Space Invaders, lame &#8230; oh so lame &#8230; just an HTML <a target=_blank title='HTML hr element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_hr.asp'>hr<\/a> (horizontal rule) element so far.  It&#8217;s early days.  Though wouldn&#8217;t count on too much here, and it is better to get the atmospherics by devoting your time to a gaming platform like Cocos  <a target=_blank le='Cocos blog post' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/cocos-open-source-game-development-primer-tutorial\/'>here<\/a>.  Another thing to note here is that we mainly function with Javascript DOM techniques in this game, and the technique to make bricks and superbugs disappear is that <a target=_blank title='Reveal themed blog postings' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/reveal'>&#8220;reveal&#8221;<\/a> (or not to reveal &#8230; that is the question) method to make the element&#8217;s style.width property be 1px.<\/p>\n<p>Now pinball, that&#8217;s another matter &#8230; but we digress.  So hope you enjoy the lameness of our HTML and Javascript and (so little, so far) CSS <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Reveal\/star_proteins_vs_superbugs.html_GETME' title='star_proteins_vs_superbugs.html'>star_proteins_vs_superbugs.html<\/a> and enjoy its accompanying <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Reveal\/star_proteins_vs_superbugs.html' title='Click picture'>live run<\/a> link.<\/p>\n<hr>\n<p id='hjrifoit'>Previous relevant <a target=_blank title='HTML\/Javascript Reveal Image In Front of Image Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/htmljavascript-reveal-image-in-front-of-image-tutorial\/'>HTML\/Javascript Reveal Image In Front of Image 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\/Reveal\/reveal_imageinfront.html\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"HTML\/Javascript Reveal Image In Front of Image Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Reveal\/infrontof.jpg\" title=\"HTML\/Javascript Reveal Image In Front of Image Tutorial\" \/><\/a><p class=\"wp-caption-text\">HTML\/Javascript Reveal Image In Front of Image Tutorial<\/p><\/div>\n<p>Continuing on with our discussion regarding HTML, Javascript and CSS on the theme of &#8220;reveal&#8221;, today we reveal an image in front of another, and triggered when the user clicks a link, following on from the previous <a target=_blank href='#hjribipt' title='HTML\/Javascript\/CSS Reveal Image Behind Image Primer Tutorial'>HTML\/Javascript\/CSS Reveal Image Behind Primer Tutorial<\/a> as shown below.<\/p>\n<p>With today&#8217;s tutorial you could argue that it also belongs with the series of blog posts related to <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=overlay\" title='overlay'><i>&#8220;overlay&#8221;<\/i><\/a>.<\/p>\n<p>Here is a tutorial that &#8220;reveals&#8221; that image in front of an image of the night sky using HTML, Javascript and CSS, featuring:<\/p>\n<ul>\n<li>Encasing working visible HTML elements within <a target=_blank title='HTML div information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_div.asp'><i>div<\/i><\/a> element for ease of:\n<ol>\n<li>positioning<\/li>\n<li>scrolling, or not<\/li>\n<li>visibility control<\/li>\n<\/ol>\n<\/li>\n<li><a target=_blank href='http:\/\/www.w3schools.com\/cssref\/pr_pos_z-index.asp' title='z-index information from w3schools'><i>z-index<\/i><\/a><\/li>\n<li><a target=_blank href='http:\/\/www.w3schools.com\/cssref\/pr_class_position.asp' title='position:absolute information from w3schools'><i>position:absolute<\/i><\/a><\/li>\n<li>Javascript <a target=_blank href='http:\/\/www.w3schools.com\/js\/js_htmldom.asp' title='Javascript DOM'>DOM<\/a> methods to dynamically change HTML, particularly with respect to visibility, and size and positioning<\/li>\n<p><!--li>HTML\/CSS body element that it is Clickable via a <i>div<\/i> supervising a \"background\" <i>a<\/i> tag (but this is not popular with the search engines)<\/li-->\n<\/ul>\n<p>So here is a tutorial about <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Reveal\/reveal_imageinfront.html' title='Click picture'>Images &#8220;revealed&#8221; in front of others<\/a>, and here is the HTML programming source code you could call <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Reveal\/reveal_imageinfront.html_GETME' title='reveal_imageinfront.html'>reveal_imageinfront.html<\/a> for the theme of an image in front of the night sky.<\/p>\n<hr \/>\n<p id='hjribipt'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=9447' title='HTML\/Javascript Reveal Image Behind Image Primer Tutorial'>HTML\/Javascript Reveal Image Behind Image 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\/Reveal\/reveal_keyhole.html\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"HTML\/Javascript Reveal Image Behind Image Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Reveal\/sur_keyhole_prise.jpg\" title=\"HTML\/Javascript Reveal Image Behind Image Primer Tutorial\" \/><\/a><p class=\"wp-caption-text\">HTML\/Javascript Reveal Image Behind Image Primer Tutorial<\/p><\/div>\n<p>Continuing on with our discussion regarding HTML, Javascript and CSS on the theme of &#8220;reveal&#8221;, today we reveal an image behind another,  increasing its size over time, and all triggered when the user clicks a link, following on from the previous <a target=_blank href='#hjcript' title='HTML\/Javascript\/CSS Reveal Information Primer Tutorial'>HTML\/Javascript\/CSS Reveal Information Primer Tutorial<\/a> as shown below.<\/p>\n<p>Here is a tutorial that &#8220;reveals&#8221; that image behind a keyhole image using HTML, Javascript and CSS, featuring:<\/p>\n<ul>\n<li>Encasing working visible HTML elements within <a target=_blank title='HTML div information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_div.asp'><i>div<\/i><\/a> element for ease of:\n<ol>\n<li>positioning<\/li>\n<li>scrolling, or not<\/li>\n<li>visibility control<\/li>\n<\/ol>\n<\/li>\n<li><a target=_blank href='http:\/\/www.w3schools.com\/cssref\/pr_pos_z-index.asp' title='z-index information from w3schools'><i>z-index<\/i><\/a><\/li>\n<li><a target=_blank href='http:\/\/www.w3schools.com\/cssref\/pr_class_position.asp' title='position:absolute information from w3schools'><i>position:absolute<\/i><\/a><\/li>\n<li>Simple masking image <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Reveal\/keyhole.png' title='Transparent keyhole with black background'>keyhole.png<\/a> which would only require an image editor to the sophistication of <a target=_blank title='Paintbrush image editor' href=\"http:\/\/paintbrush.sourceforge.net\/\">PaintBrush<\/a> to create<\/li>\n<li>Javascript <a target=_blank href='http:\/\/www.w3schools.com\/js\/js_htmldom.asp' title='Javascript DOM'>DOM<\/a> methods to dynamically change HTML, particularly with respect to visibility, and size and positioning<\/li>\n<p><!--li>HTML\/CSS body element that it is Clickable via a <i>div<\/i> supervising a \"background\" <i>a<\/i> tag (but this is not popular with the search engines)<\/li-->\n<\/ul>\n<p>So here is a tutorial about <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Reveal\/reveal_keyhole.html' title='Click picture'>Images &#8220;revealed&#8221; behind others<\/a>, and here is the HTML programming source code you could call <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Reveal\/reveal_keyhole.html_GETME' title='reveal_keyhole.html'>reveal_keyhole.html<\/a> for the theme of an image behind a keyhole &#8230; huh?!   If you try this game you may discover its inspiration.<\/p>\n<p>Content-wise, how could there be thanks enough to the &#8220;masters&#8221;, but have you ever read <a target=_blank title='Giorgio Vasari' href='http:\/\/en.wikipedia.org\/wiki\/Giorgio_Vasari'>Giorgio Vasari<\/a>&#8216;s book <i>Lives of the Most Excellent Painters, Sculptors, and Architects<\/i> ? &#8230; and we&#8217;ll include some links (or inactive link prefixes) below &#8230; thank you, terima kasih, gracias, merci, \u8c22\u8c22, danke, \u0441\u043f\u0430\u0441\u0438\u0431\u043e, \u0927\u0928\u094d\u092f\u0935\u093e\u0926, grazie, \u0e02\u0e2d\u0e02\u0e2d\u0e1a\u0e04\u0e38\u0e13, c\u1ea3m \u01a1n b\u1ea1n, \u0622\u067e \u06a9\u0627 \u0634\u06a9\u0631\u06cc\u06c1, \u3042\u308a\u304c\u3068\u3046, te\u015fekk\u00fcr ederim, dankon, obrigado, dankie,\u0634\u0643\u0631\u0627, \u03c3\u03b1\u03c2 \u03b5\u03c5\u03c7\u03b1\u03c1\u03b9\u03c3\u03c4\u03ce, \uac10\uc0ac\ud569\ub2c8\ub2e4, asante:<\/p>\n<ul>\n<li><a target=_blank href='http:\/\/workbench.cadenhead.org\/news\/3500\/link-specific-time-youtube' title='How to Link to a Specific Time in YouTube Videos'>How to Link to a Specific Time in YouTube Videos<\/a><\/li>\n<li><a target=_blank title='How to replace 1 with first, 2 with second,3 with third etc [duplicate]' href='http:\/\/stackoverflow.com\/questions\/20425771\/how-to-replace-1-with-first-2-with-second-3-with-third-etc'>How to replace 1 with first, 2 with second,3 with third etc [duplicate]<\/a><\/li>\n<li>\n<p>https:\/\/encrypted-tbn1.gstatic.com\/<\/p>\n<\/li>\n<li>\n<p>https:\/\/encrypted-tbn2.gstatic.com\/<\/p>\n<\/li>\n<li>\n<p>https:\/\/encrypted-tbn3.gstatic.com\/<\/p>\n<\/li>\n<li><a target=_blank title='http:\/\/legomenon.com\/meaning-of-the-scream-1893-painting-by-edvard-munch.html' href='http:\/\/legomenon.com\/meaning-of-the-scream-1893-painting-by-edvard-munch.html'>http:\/\/legomenon.com\/meaning-of-the-scream-1893-painting-by-edvard-munch.html<\/a><\/li>\n<li>\n<p>http:\/\/2.bp.blogspot.com\/<\/p>\n<\/li>\n<li><a target=_blank title='http:\/\/www.bbc.co.uk\/news\/uk-england-leeds-13887717' href='http:\/\/www.bbc.co.uk\/news\/uk-england-leeds-13887717'>http:\/\/www.bbc.co.uk\/news\/uk-england-leeds-13887717<\/a><\/li>\n<li>\n<p>http:\/\/news.bbcimg.co.uk\/<\/p>\n<\/li>\n<li><a target=_blank title='http:\/\/www.theepochtimes.com\/' href='http:\/\/www.theepochtimes.com\/'>http:\/\/www.theepochtimes.com\/<\/a><\/li>\n<li><a target=_blank title='http:\/\/thegreatdali.weebly.com\/masterpiece.html' href='http:\/\/thegreatdali.weebly.com\/masterpiece.html'>http:\/\/thegreatdali.weebly.com\/masterpiece.html<\/a><\/li>\n<li><a target=_blank title='http:\/\/www.theguardian.com\/artanddesign\/2011\/jun\/22\/picasso-sold-auction' href='http:\/\/www.theguardian.com\/artanddesign\/2011\/jun\/22\/picasso-sold-auction'>http:\/\/www.theguardian.com\/artanddesign\/2011\/jun\/22\/picasso-sold-auction<\/a><\/li>\n<li><a target=_blank title='http:\/\/www.wellcorps.com\/Explaining-The-Hidden-Meaning-Of-Michelangelos-Creation-of-Adam.html' href='http:\/\/www.wellcorps.com\/Explaining-The-Hidden-Meaning-Of-Michelangelos-Creation-of-Adam.html'>http:\/\/www.wellcorps.com\/Explaining-The-Hidden-Meaning-Of-Michelangelos-Creation-of-Adam.html<\/a><\/li>\n<li><a target=_blank title='http:\/\/topartnews.blogspot.com.au\/2009\/10\/defining-masterpiece-at-minneapolis.html' href='http:\/\/topartnews.blogspot.com.au\/2009\/10\/defining-masterpiece-at-minneapolis.html'>http:\/\/topartnews.blogspot.com.au\/2009\/10\/defining-masterpiece-at-minneapolis.html<\/a><\/li>\n<li><a target=_blank title='http:\/\/www.telegraph.co.uk\/news\/worldnews\/europe\/italy\/6377214\/Italian-palace-fresco-may-hide-Leonardo-da-Vinci-masterpiece.html' href='http:\/\/www.telegraph.co.uk\/news\/worldnews\/europe\/italy\/6377214\/Italian-palace-fresco-may-hide-Leonardo-da-Vinci-masterpiece.html'>http:\/\/www.telegraph.co.uk\/news\/worldnews\/europe\/italy\/6377214\/Italian-palace-fresco-may-hide-Leonardo-da-Vinci-masterpiece.html<\/a><\/li>\n<li><a target=_blank title='http:\/\/www.dailymail.co.uk\/news\/article-2413253\/Van-Goghs-sunflowers-He-painted-seven-versions-glorious-masterpiece.html' href='http:\/\/www.dailymail.co.uk\/news\/article-2413253\/Van-Goghs-sunflowers-He-painted-seven-versions-glorious-masterpiece.html'>http:\/\/www.dailymail.co.uk\/news\/article-2413253\/Van-Goghs-sunflowers-He-painted-seven-versions-glorious-masterpiece.html<\/a><\/li>\n<li><a target=_blank title='http:\/\/www.essentialvermeer.com\/catalogue\/girl_with_a_pearl_earring.html' href='http:\/\/www.essentialvermeer.com\/catalogue\/girl_with_a_pearl_earring.html'>http:\/\/www.essentialvermeer.com\/catalogue\/girl_with_a_pearl_earring.html<\/a><\/li>\n<li><a target=_blank title='http:\/\/artinvestment.ru\/en\/news\/artnews\/20100111_veronese_to_venice.html' href='http:\/\/artinvestment.ru\/en\/news\/artnews\/20100111_veronese_to_venice.html'>http:\/\/artinvestment.ru\/en\/news\/artnews\/20100111_veronese_to_venice.html<\/a><\/li>\n<li><a target=_blank title='http:\/\/www.fodors.com\/' href='http:\/\/www.fodors.com\/'>http:\/\/www.fodors.com\/<\/a><\/li>\n<li><a target=_blank title='http:\/\/www.thelocal.it\/20140324\/spaniard-strips-naked-in-front-of-botticelli-masterpiece' href='http:\/\/www.thelocal.it\/20140324\/spaniard-strips-naked-in-front-of-botticelli-masterpiece'>http:\/\/www.thelocal.it\/20140324\/spaniard-strips-naked-in-front-of-botticelli-masterpiece<\/a><\/li>\n<\/ul>\n<p>Hope you have a go at today&#8217;s &#8220;reveal&#8221; game.<\/p>\n<hr \/>\n<p id='hjcript'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=9428' title='HTML\/Javascript\/CSS Reveal Information Primer Tutorial'>HTML\/Javascript\/CSS Reveal Information 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\/Reveal\/revealing.html\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"HTML\/Javascript\/CSS Reveal Information Primer Tutorial ... thanks to Training Industry ( http:\/\/www.trainingindustry.com\/ ) for the image, within an image\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Reveal\/currys_paradox.jpg\" title=\"HTML\/Javascript\/CSS Reveal Information Primer Tutorial ... thanks to Training Industry ( http:\/\/www.trainingindustry.com\/ ) for the image, within an image\" \/><\/a><p class=\"wp-caption-text\">HTML\/Javascript\/CSS Reveal Information Primer Tutorial ... thanks to Training Industry ( http:\/\/www.trainingindustry.com\/ ) for the image, within an image<\/p><\/div>\n<p>Welcome to the continuing discussion regarding HTML, Javascript and CSS on the theme of &#8220;reveal&#8221;.  We&#8217;ll be doing several postings on this theme, and today we continue these ideas with the revealing of information in the (simple) form of a hidden <i>div<\/i> element only revealed when the user clicks a link, following on from the previous <a target=_blank href='#hjcrttbpt' title='HTML\/Javascript\/CSS Reveal Top to Bottom Primer Tutorial'>HTML\/Javascript\/CSS Reveal Top to Bottom Primer Tutorial<\/a> as shown below.<\/p>\n<p>Here is a tutorial that &#8220;reveals&#8221; wording, or information regarding a puzzle using HTML, Javascript and CSS, featuring:<\/p>\n<ul>\n<li>Encasing working visible HTML elements within <a target=_blank title='HTML div information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_div.asp'><i>div<\/i><\/a> element for ease of:\n<ol>\n<li>positioning<\/li>\n<li>scrolling, or not<\/li>\n<li>visibility control<\/li>\n<\/ol>\n<\/li>\n<li>Javascript <a target=_blank href='http:\/\/www.w3schools.com\/js\/js_htmldom.asp' title='Javascript DOM'>DOM<\/a> methods to dynamically change HTML, particularly with respect to visibility<\/li>\n<li>Javascript <a target=_blank href='http:\/\/www.w3schools.com\/jsref\/met_win_prompt.asp' title='Javascript prompt window information from w3schools ... thanks'>prompt<\/a> windows to receive, analyze and act on user interaction<\/li>\n<li>HTML\/CSS body element that it is Clickable via a <i>div<\/i> supervising a &#8220;background&#8221; <i>a<\/i> tag (but this is not popular with the search engines)<\/li>\n<\/ul>\n<p>So here is a tutorial about <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Reveal\/revealing.html' title='Click picture'>Curry&#8217;s Paradox<\/a>, and here is the HTML programming source code you could call <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Reveal\/revealing.html_GETME' title='revealing.html'>revealing.html<\/a> which called on the content of this <a href='#' onclick=' var huh=prompt(\"Hit OK to find out a lot at Wikipedia.  Am asking because you may not want to reveal this yet, and if not hit Cancel or wipe out URL and hit OK.\", \"http:\/\/en.wikipedia.org\/wiki\/Curry%27s_paradox\");  if (huh.indexOf(\"http\") != -1) { window.open(huh,\"_blank\"); } '>tutorial<\/a>.   Today there will be no links below regarding getting to other links regarding Curry&#8217;s Paradox (ie. the content), but this is available via the <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Reveal\/revealing.html\" title='Click picture'>live run<\/a> link (as above, also) (except that to say the inspiration came from an answer on the BBC quiz show <a target=_blank title=\"BBC's QI\" href='http:\/\/www.bbcnordic.com\/qi\/'>QI<\/a>) &#8230; don&#8217;t want to give away any surprises before they surprise!<\/p>\n<hr \/>\n<p id='hjcrttbpt'>Previous relevant <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=9389' title='HTML\/Javascript\/CSS Reveal Top to Bottom Primer Tutorial'>HTML\/Javascript\/CSS Reveal Top to Bottom 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\/Reveal\/reveal_fromtoptobottom.html\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"HTML\/Javascript\/CSS Reveal Top to Bottom Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Reveal\/surprise.jpg\" title=\"HTML\/Javascript\/CSS Reveal Top to Bottom Primer Tutorial\" \/><\/a><p class=\"wp-caption-text\">HTML\/Javascript\/CSS Reveal Top to Bottom Primer Tutorial<\/p><\/div>\n<p>Welcome to a new discussion regarding HTML, Javascript and CSS on the theme of &#8220;reveal&#8221;.  We&#8217;ll be doing several postings on this theme, and today we have the first.<\/p>\n<p>Do you often wish to make webpages that hide things until the user interacts with the webpage or some time period has expired, so that there is some sort of element of surprise?   <\/p>\n<p align='center'>No?<\/p>\n<p>Do you sometimes wish to make webpages that hide things until the user interacts with the webpage or some time period has expired, so that there is some sort of element of surprise?  <\/p>\n<p align='center'>Still no, huh?  (<i>Aside:<\/i> two can play this <font size=1>little<\/font> game)<\/p>\n<p>Do you occasionally wish to make webpages that hide things until the user interacts with the webpage or some time period has expired, so that there is some sort of element of surprise &#8230; OR &#8230; <br \/>will allow those who have <i>never<\/i> had this thought in their life on Earth?  <\/p>\n<p align='center'>No again, huh?  (<i>Aside:<\/i> two planets can play this puerile <font size=1>little<\/font> game!)<\/p>\n<p>Do you ever wish to make webpages that hide things until the user interacts with the webpage or some time period has expired, so that there is some sort of element of surprise &#8230; OR &#8230; <br \/>will allow those who have <i>never<\/i> had this thought in their life on Earth, nor Mars?  <\/p>\n<p align='center'>Non? Nicht?  Good nicht! (chortle, chortle)<\/p>\n<p align='center'>Well, that&#8217;s fixed their <font size=1>little<\/font> <span style='color:red;'>red<\/span> wagon.<\/p>\n<p>Here is a tutorial that &#8220;reveals&#8221; a surprise from top to bottom using HTML, Javascript and CSS, featuring:<\/p>\n<ul>\n<li>CSS <a target=_blank title=\"CSS overflow:hidden idea information from w3schools ... thanks\" href=\"http:\/\/www.w3schools.com\/cssref\/pr_pos_overflow.asp\">overflow: hidden;<\/a> style property<\/li>\n<li>Encasing working visible HTML elements within <a target=_blank title='HTML div information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_div.asp'><i>div<\/i><\/a> element for ease of:\n<ol>\n<li>positioning<\/li>\n<li>scrolling, or not<\/li>\n<li>visibility control<\/li>\n<\/ol>\n<\/li>\n<li>Javascript <a target=_blank href='http:\/\/www.w3schools.com\/jsref\/met_win_setinterval.asp' title='setInterval'>setInterval<\/a> and <a target=_blank href='http:\/\/www.w3schools.com\/jsref\/met_win_clearinterval.asp' title='clearInterval'>clearInterval<\/a> timer functionality<\/li>\n<li>Javascript <a target=_blank href='http:\/\/www.w3schools.com\/js\/js_htmldom.asp' title='Javascript DOM'>DOM<\/a> methods to dynamically change HTML (over time)<\/li>\n<li>HTML\/CSS body element <a target=_blank title='Background information at w3schools ... thanks' href='http:\/\/www.w3schools.com\/css\/css_background.asp'>background<\/a> URL (with fallback background colour) and the Javascript control of its <a target=_blank title='Body backgroundImage URL nullified advice from w3schools ... thanks' href='http:\/\/www.w3schools.com\/jsref\/prop_style_backgroundimage.asp'>fallback<\/a> to just the background colour<\/li>\n<\/ul>\n<p>So here is today&#8217;s tutorial&#8217;s <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Reveal\/reveal_fromtoptobottom.html' title='Click picture'>live run<\/a>, and here is the HTML programming source code you could call <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Reveal\/reveal_fromtoptobottom.html_GETME' title='reveal_fromtoptobottom.html'>reveal_fromtoptobottom.html<\/a> which called on the content of this <a href='#' onclick=' var huh=prompt(\"Hit OK to open new webpage showing this tutorial.  Am asking because you may not want to reveal this yet (it would give away the secret to the surprise, perhaps?), and if not hit Cancel or wipe out URL and hit OK.\", \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=9389\");  if (huh.indexOf(\"http\") != -1) { window.open(huh,\"_blank\"); } '>tutorial<\/a>.<\/p>\n<p>Chow for now, <font size=1>brown cow (she&#8217;s always on(line), you know &#8230; <b><i>but is anything sinking in?!<\/i><\/b> &#8230; I haven&#8217;t been able to moo respectfully in public after 63.5 lessons?! &#8230; she still owes me that half lesson when she didn&#8217;t get up in time for milking)<\/font>.<\/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='#d9389' onclick='var dv=document.getElementById(\"d9389\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=DOM\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d9389' 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='#d9428' onclick='var dv=document.getElementById(\"d9428\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=HTML\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d9428' 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='#d9447' onclick='var dv=document.getElementById(\"d9447\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=reveal\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d9447' 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='#d9483' onclick='var dv=document.getElementById(\"d9483\"); 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='d9483' 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='#d24927' onclick='var dv=document.getElementById(\"d24927\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=game\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d24927' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Never got into the Space Invaders video game as a kid, but somehow got all aggressive towards &#8220;Superbugs&#8221; after reading the inspiring story of Shu Lam&#8217;s revolutionary work with Star shaped proteins breaking down the Walls of protection that Superbugs &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/star-proteins-versus-superbugs-game-primer-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,15,37],"tags":[2008,281,354,476,477,576,590,652,997,1063,2009,1238,1319],"class_list":["post-24927","post","type-post","status-publish","format-standard","hentry","category-elearning","category-games","category-tutorials","tag-clipart","tag-css","tag-dom","tag-game","tag-games-2","tag-html","tag-image","tag-javascript","tag-programming","tag-reveal","tag-space-invaders","tag-table","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/24927"}],"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=24927"}],"version-history":[{"count":15,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/24927\/revisions"}],"predecessor-version":[{"id":24948,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/24927\/revisions\/24948"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=24927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=24927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=24927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}