<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
html, body, div {
height: 100%;
width: 100%;
padding: 0;
margin: 0;
}
body
{
height: 100%;
width: 100%;
background: #000 url('http://upload.wikimedia.org/wikipedia/commons/b/be/Apollo17WorldReversed.jpg') no-repeat scroll 50% 50%;
background-size: 100%;
}
</style>
</head>
<body>
</body>
</html>
http://jsfiddle.net/SBu7g/@media all and (max-width: 480px) {body
{
background-image: url(../images/MY-SmallImage.png)
background-size: cover;
}
}
@media all and (min-width: 481px) and (max-width: 768px) {body
{
background-image: url(../images/MY-MediumImage.png)
background-size: cover;
}
}
@media all and (min-width: 769px) {body
{
background-image: url(../images/MY-LargeImage.png)
background-size: cover;
}
}
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
From novice to tech pro — start learning today.
http://buildinternet.com/project/supersized/
The original background image is:
http://www.population-2.com/dev/peekaboo-wp/wp-content/uploads/2013/08/bg1.jpg
and the plugin initialization can be found on line: 52 of the page source code.