如何使用角度js使整个页面模糊除了中间的div内容?

时间:2018-05-09 12:12:50

标签: javascript html css angularjs

我想要附图像。除了模糊背景外,我能够做同样的表情。我尝试使用angularjs制作它。我无法模糊。我怎样才能将其作为下图。我使用下面的角度代码使页面模糊。我搜索过,除了表格外,我的页面模糊不清。但在这种情况下,它不是一种形式。我想模糊除div内容之外的页面。

enter image description here

<!DOCTYPE html>
    <html lang="en">
    <head>
      <title>Bootstrap Example</title>
      <meta charset="utf-8">

      <meta name="viewport" content="width=device-width, initial-scale=1">
      <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    </head>
    <body>

    <div>
        <div class="container">
            <center>
            <h3 class="container">Select a type</h3>
            <div>This is to test the page:
                <div class = "btn-group pull-center">
                  <button type = "button" class = "btn dropdown-toggle" data-toggle = "dropdown">Dropdown 
                   <span class = "caret"></span>
                  </button>

                    <ul class = "dropdown-menu" role = "menu">
                     <li>Action</li>
                     <li>Another action</li>
                     <li>Something else here</li>
                    </ul>
                </div>
            </div>
        </center>
        </div><br/><br/>

        <div class="container" style="margin-left:15cm">
            <div class="row">
             <div class="col-md-6">
              <p class="col-md-6"><b>Your paragraph goes here</b><br/>This is to test the page</p>
             </div>

             <div class="col-md-4">
               <div class="row">
                 <div class="btn btn-primary col-md-6">button 1</div><br/><br/>
               </div>

               <div class="row">
                 <div class="btn btn-success col-md-6">button 2</div><br/><br/>
               </div>

                  <div class="row">
                    <div class="btn btn-warning col-md-6">button 3</div> <br/><br/>
                  </div>

                </div>

              </div>
              <hr style="margin-right:9cm"></hr>
            </div>

            <div class="container" style="margin-left:15cm">
              <div class="row">

                <div class="col-md-6">
                  <p class="col-md-6"><b>Your paragraph goes here</b><br/>empty space between </p>
                </div>

                <div class="col-md-4">

                  <div class="row">
                    <div class="btn btn-danger col-md-6">Button 4</div><br/><br/>
                  </div>

                </div>

              </div>
            </div>
    </div>
    </body>
    </html>

1 个答案:

答案 0 :(得分:0)

创建三个容器,一个用于表单上不存在的内容,一个用于模糊,一个用于表单内容。

<div class="normal-content">
    <p>Content that is on your page</div>
<div class="blur"></div>
<div class="form-content">
    <p>Content that would exist on the form</p>
</div>

CSS

.blur{
    position:absolute;
    // We'll grow the blur box to be bigger than 100% so there isn't some weird effects that you can get with blur
    width: 104%;
    height: 104%;
    top: -2%;
    left: -2%;
    filter: blur(5px);
}