2

i want to blur the background image of this html code using css3 filter and please provide explanation.

    <!DOCTYPE html>
<html>
<head>
    <title>Student-login</title>
    <link href='http://fonts.googleapis.com/css?family=Slabo+27px' rel='stylesheet' type='text/css'>
    <style>
        body{

            background-image: url("background.jpg");
            background-size: cover;
            background-repeat: no-repeat;
            background-position: center;
            background-attachment: fixed;
        }

    </style>
</head>
<body>
    <div class="main-form">
    <h1>Hello</h1>
    </div>
</body>
</html>

But the content in this will not get blurred.

Ethereal soul
  • 709
  • 1
  • 7
  • 20

1 Answers1

1

You have to use two different containers, take a look here it will help you:

https://stackoverflow.com/a/20039965/4298050

Community
  • 1
  • 1
Samir B
  • 152
  • 1
  • 2
  • 13
  • it said there has to be two container can i use one container as body and another as div? @samir – Ethereal soul Jun 14 '15 at 17:53
  • if you put a blur on the body all your content will be blurred, i think the best solution is to make a div that doesnt comport anything exept blurred elements, and another normal that contains your content @Ethereal soul – Samir B Jun 15 '15 at 09:33