{"id":46833,"date":"2019-10-19T03:01:21","date_gmt":"2019-10-18T17:01:21","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=46833"},"modified":"2019-10-20T11:55:16","modified_gmt":"2019-10-20T01:55:16","slug":"device-width-specific-css-webpage-styling-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/device-width-specific-css-webpage-styling-primer-tutorial\/","title":{"rendered":"Device Width Specific CSS Webpage Styling Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/index.htm\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"v\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/css_media.jpg\" title=\"WeTransfer Primer Tutorial\"   \/><\/a><p class=\"wp-caption-text\">Device Width Specific CSS Webpage Styling Primer Tutorial<\/p><\/div>\n<p>Take a look at the CSS styling snippet below &#8230; <\/p>\n<p><code><br \/>\n&lt;style&gt;<br \/>\n<br \/>\n.glow {<br \/>\n  -webkit-animation: glow 1s ease-in-out infinite alternate;<br \/>\n  -moz-animation: glow 1s ease-in-out infinite alternate;<br \/>\n  animation: glow 1s ease-in-out infinite alternate;<br \/>\n  }<br \/>\n<br \/>\n\/* Thanks to https:\/\/www.w3schools.com\/howto\/tryit.asp?filename=tryhow_css_glowing_text *\/<br \/>\n<br \/>\n@-webkit-keyframes glow {<br \/>\n  from {<br \/>\n    box-shadow: 0 0 3px #fff, 0 0 5px #fff, 0 0 37px #e60073, 0 0 9px #e60073, 0 0 11px #e60073, 0 0 13px #e60073, 0 0 15px #e60073;<br \/>\n  }<br \/>\n<br \/>\n  to {<br \/>\n    box-shadow: 0 0 24px #fff, 0 0 6px #ff4da6, 0 0 8px #ff4da6, 0 0 10px #ff4da6, 0 0 12px #ff4da6, 0 0 14px #ff4da6, 0 0 16px #ff4da6;<br \/>\n  }<br \/>\n}<br \/>\n<br \/>\n@media only screen and (max-width: 768px) {<br \/>\n  #widget2 {<br \/>\n  -webkit-animation: glow 5s ease-in-out infinite alternate;<br \/>\n  -moz-animation: glow 5s ease-in-out infinite alternate;<br \/>\n  animation: glow 5s ease-in-out infinite alternate;<br \/>\n  }<br \/>\n}<br \/>\n<br \/>\n@media only screen and (max-width: 480px) {<br \/>\n  #widget2 {<br \/>\n  -webkit-animation: glow 4s ease-in-out infinite alternate;<br \/>\n  -moz-animation: glow 4s ease-in-out infinite alternate;<br \/>\n  animation: glow 4s ease-in-out infinite alternate;<br \/>\n  }<br \/>\n}<br \/>\n<br \/>\n@media only screen and (max-width: 320px) {<br \/>\n  #widget2 {<br \/>\n  -webkit-animation: glow 3s ease-in-out infinite alternate;<br \/>\n  -moz-animation: glow 3s ease-in-out infinite alternate;<br \/>\n  animation: glow 3s ease-in-out infinite alternate;<br \/>\n  }<br \/>\n}<br \/>\n&lt;\/style&gt;<br \/>\n<\/code><\/p>\n<p>Apart from the &#8220;glow&#8221; ideas we last talked about with <a target=_blank href='https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-blog-twentyten-theme-glow-tutorial\/' title='WordPress Blog TwentyTen Theme Glow Tutorial'>WordPress Blog TwentyTen Theme Glow Tutorial<\/a>, that being the &#8220;what&#8221; of what we are doing, &#8220;where&#8221; are we applying it?  <a target=_blank title='?' href='https:\/\/www.youtube.com\/watch?v=uhiCFdWeQfA'>Anyone, anyone<\/a>?  Yes, <a target=_blank title='?' href='https:\/\/en.wikipedia.org\/wiki\/Casper_Brindle'>Casper Brindle<\/a>, we&#8217;re differentiating &#8220;what&#8221; to do by device width.<\/p>\n<p>And the &#8220;@&#8221; in CSS indicates a &#8220;rule&#8221;.  So &#8230; yes, Casper Brindle?  Indeed, they are called CSS <a target=_blank title='CSS @media rules information from w3schools' href='https:\/\/www.w3schools.com\/cssref\/css3_pr_mediaquery.asp'>@media Rules<\/a> but no, Casper, it does not cover &#8220;Netflix After 10&#8221; rules, OK?<\/p>\n<p>And so, on our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/index.htm\">RJM Programming Landing Page<\/a> set of HTML\/Javascript\/CSS &#8220;Software Need Not Be Hard&#8221; will glow for a lot of mobile users, and very few laptop users.  As you can imagine, the use of such CSS can be invaluable.<\/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='#d46833' onclick='var dv=document.getElementById(\"d46833\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/mobile\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d46833' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Take a look at the CSS styling snippet below &#8230; &lt;style&gt; .glow { -webkit-animation: glow 1s ease-in-out infinite alternate; -moz-animation: glow 1s ease-in-out infinite alternate; animation: glow 1s ease-in-out infinite alternate; } \/* Thanks to https:\/\/www.w3schools.com\/howto\/tryit.asp?filename=tryhow_css_glowing_text *\/ @-webkit-keyframes glow { &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/device-width-specific-css-webpage-styling-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,37],"tags":[3113,281,322,3030,576,760,795,997,2210,1212,1319,2257],"class_list":["post-46833","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-media-rule","tag-css","tag-device","tag-glow","tag-html","tag-media","tag-mobile","tag-programming","tag-rule","tag-styling","tag-tutorial","tag-width"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/46833"}],"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=46833"}],"version-history":[{"count":5,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/46833\/revisions"}],"predecessor-version":[{"id":46838,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/46833\/revisions\/46838"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=46833"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=46833"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=46833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}