Fixed background image in css

In this tutorial i am explain about how to create fixed background image. In this case the background image is fixed  it doesn't move It covers full background size of the page.

fixed background image




<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Fixed background image</title>

<style>
html {
  background: url(images/BG.jpg) no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

</style>

</head>

<body>

<h1 style="margin-left:190px;"><a href="http://www.sanwebtutorials.blogspot.in/">www.sanwebtutorials.blogspot.in</a></h1><br><br><br>

<h1 style="margin-left:190px;"><a href="http://www.sanwebtutorials.blogspot.in/">www.sanwebtutorials.blogspot.in</a></h1><br><br><br>

<h1 style="margin-left:190px;"><a href="http://www.sanwebtutorials.blogspot.in/">www.sanwebtutorials.blogspot.in</a></h1><br><br><br>

<h1 style="margin-left:190px;"><a href="http://www.sanwebtutorials.blogspot.in/">www.sanwebtutorials.blogspot.in</a></h1><br><br><br>
<h1 style="margin-left:190px;"><a href="http://www.sanwebtutorials.blogspot.in/">www.sanwebtutorials.blogspot.in</a></h1><br><br><br>

<h1 style="margin-left:190px;"><a href="http://www.sanwebtutorials.blogspot.in/">www.sanwebtutorials.blogspot.in</a></h1><br><br><br>

<h1 style="margin-left:190px;"><a href="http://www.sanwebtutorials.blogspot.in/">www.sanwebtutorials.blogspot.in</a></h1><br><br><br>

</body>
</html>


Download Code

Post a Comment

0 Comments