[
  {
    "path": "LICENSE",
    "content": "CC0 1.0 Universal\n\nStatement of Purpose\n\nThe laws of most jurisdictions throughout the world automatically confer\nexclusive Copyright and Related Rights (defined below) upon the creator and\nsubsequent owner(s) (each and all, an \"owner\") of an original work of\nauthorship and/or a database (each, a \"Work\").\n\nCertain owners wish to permanently relinquish those rights to a Work for the\npurpose of contributing to a commons of creative, cultural and scientific\nworks (\"Commons\") that the public can reliably and without fear of later\nclaims of infringement build upon, modify, incorporate in other works, reuse\nand redistribute as freely as possible in any form whatsoever and for any\npurposes, including without limitation commercial purposes. These owners may\ncontribute to the Commons to promote the ideal of a free culture and the\nfurther production of creative, cultural and scientific works, or to gain\nreputation or greater distribution for their Work in part through the use and\nefforts of others.\n\nFor these and/or other purposes and motivations, and without any expectation\nof additional consideration or compensation, the person associating CC0 with a\nWork (the \"Affirmer\"), to the extent that he or she is an owner of Copyright\nand Related Rights in the Work, voluntarily elects to apply CC0 to the Work\nand publicly distribute the Work under its terms, with knowledge of his or her\nCopyright and Related Rights in the Work and the meaning and intended legal\neffect of CC0 on those rights.\n\n1. Copyright and Related Rights. A Work made available under CC0 may be\nprotected by copyright and related or neighboring rights (\"Copyright and\nRelated Rights\"). Copyright and Related Rights include, but are not limited\nto, the following:\n\n  i. the right to reproduce, adapt, distribute, perform, display, communicate,\n  and translate a Work;\n\n  ii. moral rights retained by the original author(s) and/or performer(s);\n\n  iii. publicity and privacy rights pertaining to a person's image or likeness\n  depicted in a Work;\n\n  iv. rights protecting against unfair competition in regards to a Work,\n  subject to the limitations in paragraph 4(a), below;\n\n  v. rights protecting the extraction, dissemination, use and reuse of data in\n  a Work;\n\n  vi. database rights (such as those arising under Directive 96/9/EC of the\n  European Parliament and of the Council of 11 March 1996 on the legal\n  protection of databases, and under any national implementation thereof,\n  including any amended or successor version of such directive); and\n\n  vii. other similar, equivalent or corresponding rights throughout the world\n  based on applicable law or treaty, and any national implementations thereof.\n\n2. Waiver. To the greatest extent permitted by, but not in contravention of,\napplicable law, Affirmer hereby overtly, fully, permanently, irrevocably and\nunconditionally waives, abandons, and surrenders all of Affirmer's Copyright\nand Related Rights and associated claims and causes of action, whether now\nknown or unknown (including existing as well as future claims and causes of\naction), in the Work (i) in all territories worldwide, (ii) for the maximum\nduration provided by applicable law or treaty (including future time\nextensions), (iii) in any current or future medium and for any number of\ncopies, and (iv) for any purpose whatsoever, including without limitation\ncommercial, advertising or promotional purposes (the \"Waiver\"). Affirmer makes\nthe Waiver for the benefit of each member of the public at large and to the\ndetriment of Affirmer's heirs and successors, fully intending that such Waiver\nshall not be subject to revocation, rescission, cancellation, termination, or\nany other legal or equitable action to disrupt the quiet enjoyment of the Work\nby the public as contemplated by Affirmer's express Statement of Purpose.\n\n3. Public License Fallback. Should any part of the Waiver for any reason be\njudged legally invalid or ineffective under applicable law, then the Waiver\nshall be preserved to the maximum extent permitted taking into account\nAffirmer's express Statement of Purpose. In addition, to the extent the Waiver\nis so judged Affirmer hereby grants to each affected person a royalty-free,\nnon transferable, non sublicensable, non exclusive, irrevocable and\nunconditional license to exercise Affirmer's Copyright and Related Rights in\nthe Work (i) in all territories worldwide, (ii) for the maximum duration\nprovided by applicable law or treaty (including future time extensions), (iii)\nin any current or future medium and for any number of copies, and (iv) for any\npurpose whatsoever, including without limitation commercial, advertising or\npromotional purposes (the \"License\"). The License shall be deemed effective as\nof the date CC0 was applied by Affirmer to the Work. Should any part of the\nLicense for any reason be judged legally invalid or ineffective under\napplicable law, such partial invalidity or ineffectiveness shall not\ninvalidate the remainder of the License, and in such case Affirmer hereby\naffirms that he or she will not (i) exercise any of his or her remaining\nCopyright and Related Rights in the Work or (ii) assert any associated claims\nand causes of action with respect to the Work, in either case contrary to\nAffirmer's express Statement of Purpose.\n\n4. Limitations and Disclaimers.\n\n  a. No trademark or patent rights held by Affirmer are waived, abandoned,\n  surrendered, licensed or otherwise affected by this document.\n\n  b. Affirmer offers the Work as-is and makes no representations or warranties\n  of any kind concerning the Work, express, implied, statutory or otherwise,\n  including without limitation warranties of title, merchantability, fitness\n  for a particular purpose, non infringement, or the absence of latent or\n  other defects, accuracy, or the present or absence of errors, whether or not\n  discoverable, all to the greatest extent permissible under applicable law.\n\n  c. Affirmer disclaims responsibility for clearing rights of other persons\n  that may apply to the Work or any use thereof, including without limitation\n  any person's Copyright and Related Rights in the Work. Further, Affirmer\n  disclaims responsibility for obtaining any necessary consents, permissions\n  or other rights required for any use of the Work.\n\n  d. Affirmer understands and acknowledges that Creative Commons is not a\n  party to this document and has no duty or obligation with respect to this\n  CC0 or use of the Work.\n\nFor more information, please see\n<http://creativecommons.org/publicdomain/zero/1.0/>"
  },
  {
    "path": "README.md",
    "content": "# Responsive Full Background Image Using CSS\n[![Responsive Full Background Image](http://cdn.sixrevisions.com/0431-02_responsive_background_demo_ss.jpg)](http://sixrevisions.com/css/responsive-background-image/)\n\n## Demo\nView the [demo on Six Revisions](http://cdn.sixrevisions.com/0431-01_responsive_background_image_demo/responsive-full-background-image-demo.html).\n\n## What Is This?\nThese are the sources files for a Six Revisions tutorial called [Responsive Full Background Image Using CSS](http://sixrevisions.com/css/responsive-background-image/).\n\n* `responsive-full-background-image.css` - this contains the CSS for achieving the responsive full background image\n* `responsive-full-background-image-demo.html` - this is the HTML source code\n* Files in the `/presentational-only` are not required. They're purely for demonstrative purposes.\n* `/images` directory contains the background images. The background image is from [Unsplash](http://unsplash.com/).\n\n## Basics\nThe most important property/value pair is `background-size: cover`, which dynamically scales the background image to cover the viewport even when it's resized. Responsive full background image can be achieved using this simple style rule:\n\n```\nbackground: url(background-photo.jpg) center center cover no-repeat fixed;\n```\n\nFor a faster page load on small screens (i.e., mobile devices) a scaled-down version of the background image is served using a media query.\n\nFor a complete explanation, read this tutorial: [Responsive Full Background Image Using CSS](http://sixrevisions.com/css/responsive-background-image/).\n\n## License\nThe source code is released into the public domain under [CC0 1.0 Universal](https://github.com/sixrevisions/responsive-full-background-image/blob/master/LICENSE). The source code is free of any copyright restrictions. You can use, copy, sell, modify, distribute, etc. the code, even for commercial purposes, all without asking permission, providing attribution or performing any requirement.\n"
  },
  {
    "path": "presentational-only/presentational-only.css",
    "content": "/* Presentational style rules only\n * Not required\n */\n\nhtml, body, .container {\n  height: 100%;\n}\n\n/* Reset */\nhtml, body, h1, p, a, div, section {\n  margin: 0;\n  padding: 0;\n  font-size: 100%;\n  font: inherit;\n}\n\n/* Basic */\nbody { \n  font: 18px/23px \"Cantarell\", sans-serif;\n  color: #ffffff;\n}\n\nh1 {\n  color: #efecec;\n  text-transform: uppercase;\n  font-size: 40px;\n  line-height: 50px;\n  font-weight: 400;\n  margin-top: 20px;\n}\n\na {\n  color: #ffffff;\n}\n\np {\n  margin: 0 0 15px 0;\n}\n\nstrong {\n  font-weight: 700;\n}\n\nblockquote {\n  display: block;\n  max-width: 480px;\n  margin: 15px auto;\n  padding: 15px;\n  background-color: rgba(0, 0, 0, 0.3);  \n  color: #e1e1e1;\n  font-family: \"Kotta One\", serif;\n  font-size: 22px;\n  line-height: 28px;\n}\n\nblockquote cite {\n  display: block;\n  font: 18px/23px \"Cantarell\", sans-serif;\n  font-size: 16px;\n  margin-top: 16px;\n  color: #cccccc;\n  text-transform: uppercase;\n}\n\n/* Layout */\n\n.navbar {\n  width: 100%;\n  background-color: rgba(0, 0, 0, 0.6);\n  height: 40px;\n  z-index: 9999;\n  position: fixed;\n}\n\n  .inner {\n    position: relative;\n    margin: 0 auto;\n    text-align: center;\n  }\n\n.navbar a {\n  display: inline-block;\n  border: 1px solid #fff;\n  font-size: 14px;\n  line-height: 24px;\n  border-radius: 3px;\n  padding: 2px 15px;\n  text-decoration: none;\n  margin-top: 5px;\n}\n\n.container {\n  display: table;\n  padding-top: 80px;\n  width: 100%;\n}\n\n.content {\n  display: table-cell;\n  vertical-align: middle;\n  text-align: center;\n}\n\n/* Special */\n.sub-title {\n  margin: 50px auto;\n  font-size: 18px;\n  line-height: 23px;\n  text-transform: uppercase;\n}\n\n.button {\n  display: inline-block;\n  padding: 6px 10px;\n  color: #cafaea;\n  border: 1px solid #cafaea;\n  border-radius: 3px;\n  font-weight: 700;\n  line-height: normal;\n  text-decoration: none;\n  text-align: center;\n  text-transform: uppercase;\n}\n\n#more-content {\n  display: none;\n}\n\n/* Media Queries */\n@media only screen and (max-width: 340px) {\n  \n  .container {\n    position: relative;\n    display: block;\n    float: left;\n    vertical-align: baseline;\n    margin: 0 auto;\n    padding: 80px 0 0 0;\n  }\n  \n  #more-content {\n    float: left;\n    margin-right: 10px;\n    \n  }\n  \n  body h1 {\n    font-size: 18px;\n    line-height: 23px;\n  } \n  \n  .content, blockquote {  \n    display: inline;\n    margin: 0 auto;\n    padding-top: 80px;\n    vertical-align: baseline;\n  }\n\n  blockquote {\n    width: 150px;\n    margin: 15px auto;\n    font-size: 16px;\n    line-height: 21px;\n    background-color: transparent;\n  }\n\n  blockquote cite {\n    font-size: 14px;\n    line-height: 19px;\n  }\n\n  .sub-title {\n    font-size: 14px;\n    line-height: 21px;\n  }\n\n  .button, p {\n    max-width: 150px;\n    margin: 0 auto;\n    font-size: 15px;\n    line-height: 20px;\n  }\n\n  html, body, .container {\n    height: auto;\n  }\n}"
  },
  {
    "path": "presentational-only/presentational-only.js",
    "content": "$(document).ready(function()\n{\n  $('#load-more-content').click(function()\n  {\n    \n    $('#more-content').toggleClass('shown');\n\n    $('#load-more-content').hide();\n\n    if( $('#more-content').hasClass('shown') )\n    {\n      $('#load-more-content').text('Hide content');\n      $('#more-content').fadeIn('slow', function()\n      {\n        $('#load-more-content').fadeIn('slow');\n      });\n    }\n    else\n    {\n      $('#load-more-content').text('Load some content');\n      $('#more-content').fadeOut('slow', function()\n      {\n        $('#load-more-content').fadeIn('slow');\n      });\n    }\n  });\n});"
  },
  {
    "path": "responsive-full-background-image-demo.html",
    "content": "\n<!-- Tutorial URL: http://sixrevisions.com/css/responsive-background-image/ -->\n\n<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Responsive Full Background Image</title>\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n  <meta name=\"author\" content=\"Six Revisions\">\n  <meta name=\"description\" content=\"How to use the CSS background-size property to make an image fully span the entire viewport.\">\n  <link rel=\"icon\" href=\"http://sixrevisions.com/favicon.ico\" type=\"image/x-icon\" />\n  <link href=\"http://fonts.googleapis.com/css?family=Kotta+One|Cantarell:400,700\" rel=\"stylesheet\" type=\"text/css\">\n  <!--[if lt IE 9]>\n  <script src=\"http://html5shiv.googlecode.com/svn/trunk/html5.js\"></script>\n  <![endif]-->\n\n  <!-- Not required: presentational-only.css only contains CSS for prettifying the demo -->\n  <link rel=\"stylesheet\" href=\"presentational-only/presentational-only.css\">\n\n  <!-- responsive-full-background-image.css stylesheet contains the code you want -->\n  <link rel=\"stylesheet\" href=\"responsive-full-background-image.css\">\n  \n  <!-- Not required: jquery.min.js and presentational-only.js is only used to demonstrate scrolling behavior of the viewport  -->\n  <script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js\"></script>\n  <script src=\"presentational-only/presentational-only.js\"></script>\n</head>\n<body>\n  <nav class=\"navbar\" id=\"top\">\n    <div class=\"inner\">\n      <a href=\"http://sixrevisions.com/css/responsive-background-image/\">Read Tutorial</a>\n    </div>\n  </nav>\n  <header class=\"container\">\n    <section class=\"content\">\n      <h1>Responsive Full Background Image</h1>\n      <p class=\"sub-title\"><strong>Resize your browser window</strong> <br /> to see the background image change in size</p>\n      <p><a class=\"button\" id=\"load-more-content\" href=\"#top\">Load some content</a></p>\n      <p>To see scrolling behavior</p>\n      \n      <!-- Some content to demonstrate viewport scrolling behavior -->\n      <div id=\"more-content\">\n        <p><br />Background image courtesy of <br /> <a href=\"http://unsplash.com/\" target=\"_blank\">Unsplash</a>.</p>\n        <blockquote>\n        Creating a goal-driven statement of what a product or application does results in better product experiences.\n        It meets expectations because it is focused on solving the problem it was created to address.\n        There is power in doing one thing and it doing it very well.\n        <cite>\n          Francisco Inchauste\n          From <a href=\"http://sixrevisions.com/usabilityaccessibility/creating-a-timeless-user-experience/\" target=\"_blank\">Creating a Timeless User Experience</a>\n        </cite>\n        </blockquote>\n        <blockquote>\n        Fitts' law is centered around a mathematical equation that is used to illustrate the time it takes to reach a target object.\n        A target object, in the context of UIs, can be any interactive element, such as a submit button, a hyperlink, and an input field in a web form.\n        The idea is this: The quicker you can reach a target object, the more convenient and easy it is to use.\n          <cite>\n          Jason Gross\n          From <a href=\"http://sixrevisions.com/usabilityaccessibility/improving-usability-with-fitts-law/\" target=\"_blank\">Improving Usability with Fitts' Law</a>\n          </cite>\n        </blockquote>\n        <blockquote>\n        Visual weight revolves around the idea that distinct elements in a design have varying heaviness relative to each other. \n        Sometimes visual weight is obvious, such as in the case where larger objects appear heavier than smaller objects because they take up more space. \n        In certain instances, it’s not so cut and dry, such as in the case of color. Some colors may look as if they are heavier and more dominant than others.\n          <cite>\n          Kayla Knight\n          From <a href=\"http://sixrevisions.com/graphics-design/visual-weight-designs/\" target=\"_blank\">Working with Visual Weight in Your Designs</a>\n          </cite>\n        </blockquote>\n      </div>\n    </section>\n  </header>\n</body>\n</html>"
  },
  {
    "path": "responsive-full-background-image.css",
    "content": "/* Responsive Full Background Image Using CSS\n * Tutorial URL: http://sixrevisions.com/css/responsive-background-image/\n*/\nbody {\n  /* Location of the image */\n  background-image: url(images/background-photo.jpg);\n  \n  /* Image is centered vertically and horizontally at all times */\n  background-position: center center;\n  \n  /* Image doesn't repeat */\n  background-repeat: no-repeat;\n  \n  /* Makes the image fixed in the viewport so that it doesn't move when \n     the content height is greater than the image height */\n  background-attachment: fixed;\n  \n  /* This is what makes the background image rescale based on its container's size */\n  background-size: cover;\n  \n  /* Pick a solid background color that will be displayed while the background image is loading */\n  background-color:#464646;\n  \n  /* SHORTHAND CSS NOTATION\n   * background: url(background-photo.jpg) center center cover no-repeat fixed;\n   */\n}\n\n/* For mobile devices */\n@media only screen and (max-width: 767px) {\n  body {\n    /* The file size of this background image is 93% smaller\n     * to improve page load speed on mobile internet connections */\n    background-image: url(images/background-photo-mobile-devices.jpg);\n  }\n\t}"
  }
]